Ejemplo n.º 1
0
 public async Task <ActionResult> ResidentAdd(ResidentInputModel model)
 {
     if (model != null)
     {
         var resident = new Resident
         {
             Name       = model.Name,
             Type       = model.Type,
             From       = model.From,
             To         = model.To,
             OwnerEmail = model.OwnerEmail,
             Desc       = model.Desc
         };
         await _residentRepository.SaveResidentAsync(resident);
     }
     return(Redirect("/Hotel"));
 }