public static ProjectModel ToModel(this ProjectEntity entity, GoalModel goal) => new ProjectModel { Id = entity.Id, Goal = goal, Title = entity.Title, Description = entity.Description, };
public static GoalEntity ToEntity(this GoalModel model) { if (model == null) { throw new ArgumentNullException(nameof(model)); } return(new GoalEntity { Id = model.Id, Title = model.Title, Description = model.Description, Importance = model.Importance }); }