InitController.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using CZFW.Framework.Model.ViewModel;
  2. using CZFW.MDB;
  3. using Microsoft.AspNetCore.Mvc;
  4. namespace CZFW.CMS.Web.Areas.Schema.Controllers
  5. {
  6. [Produces("application/json")]
  7. public class InitController : Controller
  8. {
  9. IMongoRepository _repository;
  10. public InitController(IMongoRepository repository)
  11. {
  12. _repository = repository;
  13. }
  14. public IActionResult Index()
  15. {
  16. return View();
  17. }
  18. public ResultModel Init()
  19. {
  20. InitNav();
  21. InitSysConfig();
  22. InitFriendLink();
  23. return new ResultModel();
  24. }
  25. public ResultModel InitSysTables()
  26. {
  27. var tp = _repository.AsureTableExist("schema");
  28. return null;
  29. }
  30. public ResultModel InitNav()
  31. {
  32. var tp = _repository.AsureTableExist("navigation");
  33. return null;
  34. }
  35. public ResultModel InitSysConfig()
  36. {
  37. return null;
  38. }
  39. public ResultModel InitFriendLink()
  40. {
  41. return null;
  42. }
  43. }
  44. }