public void AddDigikalaBasePage(DigikalaPageBaseDTO dto) { DigikalaBasePage model = new DigikalaBasePage(); model.CreateDate = DateTime.Now; model.ChangeFreq = dto.ChangeFreq; model.ImageCaption = dto.ImageCaption; model.ImageLoc = dto.ImageLoc; model.Loc = dto.Loc; model.Priority = dto.Priority; digikalaBasePages.Insert(model); }
public void AddDigikalaBasePages(List <DigikalaPageBaseDTO> dtos) { List <DigikalaBasePage> models = new List <DigikalaBasePage>(); DateTime CreateDate = DateTime.Now; foreach (var dto in dtos) { DigikalaBasePage model = new DigikalaBasePage(); model.DKP = dto.DKP; model.Crawled = false; model.CreateDate = CreateDate; model.ChangeFreq = dto.ChangeFreq; model.ImageCaption = dto.ImageCaption; model.ImageLoc = dto.ImageLoc; model.Loc = dto.Loc; model.Priority = dto.Priority; model.CrawlDate = null; models.Add(model); } digikalaBasePages.InsertBatch(models); }