示例#1
0
 public ActionResult <Factura> create(Factura factura)
 {
     factura.IVA       = factura.SubTotal * 0.16;
     factura.Retencion = factura.SubTotal * 0.01;
     factura.Total     = factura.SubTotal + factura.IVA + factura.Retencion;
     factura.Fecha     = DateTime.Today;
     factura.Estado    = "PrimerRecordatorio";
     factura.Pagada    = false;
     factura.FechaPago = "";
     _facturaService.Create(factura);
     return(CreatedAtRoute("GetFactura", new { id = factura.Id.ToString() }, factura));
 }
示例#2
0
        public static void Main(string[] args)
        {
            var host = CreateWebHostBuilder(args)

#if DEBUG
                       .UseUrls("http://192.168.1.200:10000")
#endif
                       .Build();
            var scope    = host.Services.CreateScope();
            var services = scope.ServiceProvider;
            var context  = services.GetRequiredService <bao_ton_tnContext>();

            DataBaseService.Create(context);
            host.Run();
        }
示例#3
0
 public ActionResult <Cliente> create(Cliente cliente)
 {
     _clienteService.Create(cliente);
     return(CreatedAtRoute("GetCliente", new { id = cliente.Id.ToString() }, cliente));
 }