public CustomerPolicyResponse CreateCustomerPolicy(CustomerPolicyRequest customerPolicyRequest) { TSeg_Clientes_Polizas customerPolicy = CustomerPolicyMapper.TransformCustomerPolicyRequestToTSegClientePoliza(customerPolicyRequest); TSeg_Clientes_Polizas customerPolicyOut = CustomerPolicyDomainService.CreateCustomerPolicy(customerPolicy); return(customerPolicyOut != null?CustomerPolicyMapper.TransformTSegClientePolizaToCustomerPolicyResponse(customerPolicyOut) : null); }
public TSeg_Clientes_Polizas CreateTSegClientesPolizas(TSeg_Clientes_Polizas tSegClientePoliza) { try { _context.TSeg_Clientes_Polizas.Add(tSegClientePoliza); _context.SaveChanges(); return(tSegClientePoliza); } catch (Exception ex) { throw ex; } }
public TSeg_Clientes_Polizas CreateCustomerPolicy(TSeg_Clientes_Polizas customerPolicy) { return(CustomerPolicyRepository.CreateTSegClientesPolizas(customerPolicy)); }
public static CustomerPolicyResponse TransformTSegClientePolizaToCustomerPolicyResponse(TSeg_Clientes_Polizas customerPolicy) { return(new CustomerPolicyResponse { cobertura = customerPolicy.cobertura.ToString(), fecha_inicio = customerPolicy.fecha_inicio.ToString(), meses_cobertura = Convert.ToInt16(customerPolicy.meses_cobertura), precio = customerPolicy.precio.ToString(), riesgo = customerPolicy.riesgo, id_poliza = customerPolicy.id_poliza, id_cliente = customerPolicy.id_cliente }); }