Beispiel #1
0
 public static ProjectModel ToModel(this ProjectEntity entity, GoalModel goal) =>
 new ProjectModel
 {
     Id          = entity.Id,
     Goal        = goal,
     Title       = entity.Title,
     Description = entity.Description,
 };
Beispiel #2
0
 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
     });
 }