public IEnumerable <IScheduledPublishHistory> Find(Guid itemId, string language, string version) { using (var context = ContextFactory.Create()) { return(context.ScheduledPublishHistories.Where(sph => sph.ItemId == itemId && string.Equals(sph.Language, (language ?? string.Empty)) && string.Equals(sph.Version, (version ?? string.Empty)) ).ToList()); } }
public void Add(IScheduledPublishHistory scheduledPublishHistory) { using (var context = ContextFactory.Create()) { var record = ScheduledPublishHistoryFactory.Create(scheduledPublishHistory); context.ScheduledPublishHistories.Add(record); context.SaveChanges(); } }