public FrontMenuController(IMenuCategoryServices menuCategoryService, IMenuServices menuService, IPageMetaServices pageMetaService, IMapper mapper, IQNZDbContext db) { _menuService = menuService; _menuCategoryService = menuCategoryService; _pageMetaService = pageMetaService; _mapper = mapper; _db = db; }
public ArticleController(IQNZDbContext db, IMapper mapper) { //_categoryServices = categoryServices; //_articleServices = articleServices; //_pageMetaServices = pageMetaServices; //_templateServices = templateServices; _mapper = mapper; _db = db; }
public async Task SetPageMetaAsync(IQNZDbContext db, short modelType, string objectId, string objectTitle, string title, string keywords, string description) { var pageMeta = await db.PageMetas.FirstOrDefaultAsync(d => d.ModelType == modelType && d.ObjectId == objectId); if (pageMeta != null) { if (!string.IsNullOrEmpty(title) || !string.IsNullOrEmpty(keywords) || !string.IsNullOrEmpty(description)) { pageMeta.ObjectId = objectId; pageMeta.Title = string.IsNullOrEmpty(title) ? objectTitle : title; pageMeta.Keyword = string.IsNullOrEmpty(keywords) ? objectTitle : keywords.Replace(',', ','); pageMeta.Description = description; pageMeta.ModelType = modelType; db.Entry(pageMeta).State = EntityState.Modified; } else { db.PageMetas.Remove(pageMeta); } } else { if (!string.IsNullOrEmpty(title) || !string.IsNullOrEmpty(keywords) || !string.IsNullOrEmpty(description)) { pageMeta = new PageMeta() { ObjectId = objectId, Title = string.IsNullOrEmpty(title) ? objectTitle : title, Keyword = string.IsNullOrEmpty(keywords) ? objectTitle : keywords.Replace(',', ','), Description = description, ModelType = modelType }; db.PageMetas.Add(pageMeta); } } await db.SaveChangesAsync(); }
public OutletController(IMapper mapper, IQNZDbContext db) { _db = db; _mapper = mapper; }
public ContactController(TZGCMS.Infrastructure.Email.IEmailService emailService, IQNZDbContext db) { _emailService = emailService; _db = db; }
public JoinController(IMapper mapper, IQNZDbContext db) { _db = db; _mapper = mapper; }
public PhotosController(IMapper mapper, IQNZDbContext db) { _db = db; _mapper = mapper; }
public AchievementCategoriesController(IMapper mapper, IQNZDbContext db) { _db = db; _mapper = mapper; }
public InstituteController(IMapper mapper, IQNZDbContext db) { _db = db; _mapper = mapper; }
public LaboratoriesController(IMapper mapper, IQNZDbContext db) { _db = db; _mapper = mapper; }
public ProductController(IMapper mapper, IQNZDbContext db) { _db = db; _mapper = mapper; }
public ProductsController(IMapper mapper, ICacheService cacheService, IQNZDbContext db) { _cacheService = cacheService; _db = db; _mapper = mapper; }
public AlbumsController(IMapper mapper, IQNZDbContext db) { _db = db; _mapper = mapper; }
public SearchController(IMapper mapper, IQNZDbContext db) { _db = db; _mapper = mapper; }
public ArticleController(IMapper mapper, IQNZDbContext db) { _db = db; _mapper = mapper; }
public MenuController(ICacheService cacheService, IQNZDbContext db) { _cacheService = cacheService; _db = db; }
public CooperationController(IMapper mapper, IQNZDbContext db) { _db = db; _mapper = mapper; }