IEnumerable <WorkItemCollectionPublic> IWorkItemCollectionsRepository.GetAllWorkItemCollections(int ID) { List <WorkItemCollection> collections = mDBContext.WorkItemCollections.Where(wic => wic.TaskBoardId == ID).ToList(); WorkItemCollectionConverter converter = new WorkItemCollectionConverter(mDBContext); foreach (WorkItemCollection collection in collections) { yield return(converter.Convert(collection)); } }
public WorkItemCollectionPublic UpdateWorkItemCollection(WorkItemCollectionPublic workItemCollection) { Ensure.ParamNotNull(workItemCollection, nameof(workItemCollection)); WorkItemCollectionLogic wicLogic = new WorkItemCollectionLogic(mDBContext); WorkItemCollectionConverter converter = new WorkItemCollectionConverter(mDBContext); WorkItemCollection updatedCollection = wicLogic.UpdateWorkItemCollection(converter.Convert(workItemCollection)); mDBContext.SaveChanges(); return(converter.Convert(updatedCollection)); }