Beispiel #1
0
        public object Post(PagoPrestamoModel pagoPrestamo)
        {
            int result;

            Console.WriteLine(pagoPrestamo.cantidad_pago);
            result = prestamoQuery.pago(pagoPrestamo, sql);
            return(new { result });
        }
Beispiel #2
0
        public int pago(PagoPrestamoModel pagoPrestamo, SqlServer sqlServer)
        {
            var cantidad    = new SqlParameter("@Cant", pagoPrestamo.cantidad_pago);
            var id_prestamo = new SqlParameter("@Prestamo", pagoPrestamo.id_prestamo);
            int result      = sqlServer.Database.ExecuteSqlRaw("exec Pago @Cant, @Prestamo", cantidad, id_prestamo);

            return(result);
        }