Esempio n. 1
0
 public ActionResult Save(LogBeneficiarioDto model)
 {
     if (ModelState.IsValid)
     {
         var LogBeneficiario = new LogBeneficiario();
         _LogBeneficiario.Save(model);
         return(RedirectToAction("List"));
     }
     else
     {
         return(RedirectToAction("Create", model));
     }
 }
 /// <summary>
 /// Salva e retorna o objeto<T> salvo
 /// </summary>
 public virtual LogBeneficiarioDto SaveGetItem(LogBeneficiarioDto model)
 {
     _unitOfWork.GetRepository <LogBeneficiarioDto>().Add(model);
     return(model);
 }
 /// <summary>
 /// Salva a edição de um objeto<T>
 /// </summary>
 public virtual void Update(LogBeneficiarioDto model)
 {
     _unitOfWork.GetRepository <LogBeneficiarioDto>().Update(model);
 }
 /// <summary>
 /// Salva um objeto<T>
 /// </summary>
 public virtual void Save(LogBeneficiarioDto model)
 {
     _unitOfWork.GetRepository <LogBeneficiarioDto>().Add(model);
 }