Exemplo n.º 1
0
        public async Task <IActionResult> Post([FromBody] BioLandingCreateModel model)
        {
            var dbModel = model.ToModel();

            dbModel.Id = Guid.NewGuid();
            return(Ok((await repo.Insert(dbModel)).ToViewModel()));
        }
Exemplo n.º 2
0
 public static BioLanding ToModel(this BioLandingCreateModel createModel)
 {
     return(new BioLanding
     {
         Id = Guid.NewGuid(),
         Name = createModel.Name,
         Title = createModel.Title
     });
 }