public async Task <IActionResult> PostNewStudent([FromBody] Interventions student) { try{ if (student == null) { return(BadRequest()); } ; using (var ctx = new emmanueltshibanguContext()) { ctx.Interventions.Add(new Interventions() { Reports = student.Reports, Author = student.Author, CustomerId = student.CustomerId, BuildingId = student.BuildingId, BatteryId = student.BatteryId, ColumnId = student.ColumnId, ElevatorId = student.ElevatorId, }); ctx.SaveChanges(); await _context.SaveChangesAsync(); } } catch (Exception e) { int i = 0; } return(Ok()); }
public CustomersController(emmanueltshibanguContext context) { _context = context; }
public addressesController(emmanueltshibanguContext context) { _context = context; }
public interventionsController(emmanueltshibanguContext context) { _context = context; }
public elevatorsController(emmanueltshibanguContext context) { _context = context; }
public columnsController(emmanueltshibanguContext context) { _context = context; }
public employeesController(emmanueltshibanguContext context) { _context = context; }
public BatteriesController(emmanueltshibanguContext context) { _context = context; }
public LeadsController(emmanueltshibanguContext context) { _context = context; }
public buildingsController(emmanueltshibanguContext context) { _context = context; }