public override long Create(Issue entity) { var newIssue = new PersistenceIssue { Title = entity.Title, Notes = entity.Notes, CreatedOn = entity.CreatedOn, ModifiedOn = entity.ModifiedOn }; Context.Issues.Add(newIssue); Context.SaveChanges(); return(newIssue.Id); }
public static Issue ToIssue(this PersistenceIssue issue) { return(new Issue(issue.Id, issue.Title, issue.Notes, issue.CreatedOn, issue.ModifiedOn)); }