public bool InsertBanner(PBanneModel model) { try { P_Banner data = new P_Banner() { //Id = model.Id, StartDate = model.StartDate, Url = model.Url, Image = model.Image, Status = model.Status, EndDate = model.EndDate, Position = model.Position, ImageType = model.ImageType, ImagePosition = model.ImagePosition, Description = model.Description, Title = model.Title, CampaignId = model.CampaignId, ImageMobile = model.ImageMobile }; _unitOfWork.Repository <P_Banner>().Insert(data); _unitOfWork.Save(); return(true); } catch (Exception ex) { NLog.LogManager.GetCurrentClassLogger().Debug(" InsertBanner() - ex {0} giay ", ex.ToString()); return(false); } }
public PBanneModel(P_Banner model) { Id = model.Id; Image = model.Image; Url = model.Url; StartDate = model.StartDate; EndDate = model.EndDate; Position = model.Position; ImagePosition = model.ImagePosition; ImageType = model.ImageType; Title = model.Title; Description = model.Description; Status = model.Status; CampaignId = model.CampaignId; ImageMobile = model.ImageMobile; }