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());
        }
Exemple #2
0
 public CustomersController(emmanueltshibanguContext context)
 {
     _context = context;
 }
 public addressesController(emmanueltshibanguContext context)
 {
     _context = context;
 }
 public interventionsController(emmanueltshibanguContext context)
 {
     _context = context;
 }
Exemple #5
0
 public elevatorsController(emmanueltshibanguContext context)
 {
     _context = context;
 }
Exemple #6
0
 public columnsController(emmanueltshibanguContext context)
 {
     _context = context;
 }
 public employeesController(emmanueltshibanguContext context)
 {
     _context = context;
 }
Exemple #8
0
 public BatteriesController(emmanueltshibanguContext context)
 {
     _context = context;
 }
 public LeadsController(emmanueltshibanguContext context)
 {
     _context = context;
 }
Exemple #10
0
 public buildingsController(emmanueltshibanguContext context)
 {
     _context = context;
 }