Ejemplo n.º 1
0
 public async Task <IActionResult> CreateCell(CellCreateViewModel model)
 {
     if (ModelState.IsValid)
     {
         var cell = new Cell(model);
         try
         {
             repository.Add(cell);
         }
         catch (Exception ex)
         {
             throw new Exception("Erro ao salvar Célula", ex);
         }
         return(RedirectToAction("list", "event"));
     }
     return(await ReloadDataAndReturnView());
 }
Ejemplo n.º 2
0
 public Cell(CellCreateViewModel model)
 {
     Date        = model.Date;
     Convertions = model.Convertions;
     EventType   = EventType.CÉLULA;
 }