public static RequirementComment To(RequirementCommentAPI item) { return(new RequirementComment { ID = item.ID, Comment = item.Comment, RequirementID = item.RequirementID }); }
public static RequirementAPI From(Requirement item, bool includeTasks = true, bool includeComments = true) { if (item != null) { return(new RequirementAPI { ID = item.ID, Title = item.Title, Status = item.Status, Tasks = includeTasks && item.Tasks != null?TaskAPI.From(item.Tasks).ToList() : null, Comments = includeComments && item.Comments != null?RequirementCommentAPI.From(item.Comments).ToList() : null, FeatureID = item.FeatureID, Feature = FeatureAPI.From(item.Feature, false), IsNew = item.IsNew }); } else { return(null); } }
public static Requirement To(RequirementAPI item, bool includeTasks = true, bool includeComments = true) { if (item != null) { return(new Requirement { ID = item.ID, Title = item.Title, Status = item.Status, Tasks = includeTasks ? TaskAPI.To(item.Tasks) : null, Comments = includeComments ? RequirementCommentAPI.To(item.Comments) : null, FeatureID = item.FeatureID, Feature = FeatureAPI.To(item.Feature), IsNew = item.IsNew }); } else { return(null); } }