Ejemplo n.º 1
0
 public async Task <IActionResult> Create([FromBody] Client client)
 {
     try
     {
         _context.Client.Add(client);
         _context.SaveChanges();
         return(Ok(client));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
Ejemplo n.º 2
0
 public async Task <IActionResult> Create([FromBody] TimeSheet timeSheet)
 {
     try
     {
         _context.TimeSheets.Add(timeSheet);
         _context.SaveChanges();
         return(Ok(timeSheet));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
 public async Task <IActionResult> Create([FromBody] PaymentSheetDetail paymentSheetDetail)
 {
     try
     {
         _context.PaymentSheetDetails.Add(paymentSheetDetail);
         _context.SaveChanges();
         return(Ok(paymentSheetDetail));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
Ejemplo n.º 4
0
 public async Task <IActionResult> Create([FromBody] SubContractor subcontractor)
 {
     try
     {
         _context.SubContractor.Add(subcontractor);
         _context.SaveChanges();
         return(Ok(subcontractor));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
Ejemplo n.º 5
0
 public async Task <IActionResult> Create([FromBody] Job job)
 {
     try
     {
         _context.Job.Add(job);
         _context.SaveChanges();
         return(Ok(job));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
Ejemplo n.º 6
0
 public async Task <IActionResult> Create([FromBody] Employee employee)
 {
     try
     {
         _context.Employee.Add(employee);
         _context.SaveChanges();
         return(Ok(employee));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }