public CuentaAhorroModel Add(CuentaAhorroModel c) { try { var cuenta = GetCuenta(); c.NumeroCuenta = cuenta; return(_cuentaAhorroRepository.Add(c)); } catch (System.Exception e) { _logger.LogError(e.ToString()); throw; } }
public CuentaAhorroModel Add(CuentaAhorroModel c) { var entity = new CuentaAhorro { ClienteId = c.ClienteId, NumeroCuenta = c.NumeroCuenta, FechaCreacion = DateTime.Now, Estado = (int)CuentaAhorroEstados.Activa }; _context.CuentasAhorros.Add(entity); _context.SaveChanges(); c.Id = entity.Id; return(c); }
public CuentaAhorroModel Add(CuentaAhorroModel c) { return(_cuentaAhorroLogic.Add(c)); }