public void Update(HomePageBasicInfo homeBasicInfo) { try { _db.HomePageBasicInfo.Update(homeBasicInfo); _db.SaveChanges(); } catch { } }
public static HomePageBasicInfoViewModel MapToViewModel(this HomePageBasicInfo homePageBasicInfo) { return(new HomePageBasicInfoViewModel() { Id = homePageBasicInfo.Id, LogoUrl = homePageBasicInfo.LogoUrl, ApprovalDate = homePageBasicInfo.ApprovalDate, ApprovedById = homePageBasicInfo.ApprovedById, CreatedById = homePageBasicInfo.CreatedById, CreationDate = homePageBasicInfo.CreationDate, FavIconUrl = homePageBasicInfo.FavIconUrl, ModificationDate = homePageBasicInfo.ModificationDate, ModifiedById = homePageBasicInfo.ModifiedById, SeoDescriptionAR = homePageBasicInfo.SeoDescriptionAR, SeoTwitterCardEN = homePageBasicInfo.SeoTwitterCardEN, SeoTwitterCardAR = homePageBasicInfo.SeoTwitterCardAR, SeoTitleEN = homePageBasicInfo.SeoTitleEN, SeoTitleAR = homePageBasicInfo.SeoTitleAR, SeoOgTitleEN = homePageBasicInfo.SeoOgTitleEN, SeoOgTitleAR = homePageBasicInfo.SeoOgTitleAR, SeoDescriptionEN = homePageBasicInfo.SeoDescriptionEN, }); }