Пример #1
0
        public async Task <IActionResult> Create([Bind("Id,CoordinateAsJson,FireSeverity,TimeStamp,DroneAssignmentId")] FireReport fireReport)
        {
            if (ModelState.IsValid)
            {
                _context.Add(fireReport);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(fireReport));
        }
Пример #2
0
        public async Task AddReport(Domain.FireReport report)
        {
            await _context.Set <Domain.FireReport>().AddAsync(report);

            await _context.SaveChangesAsync();
        }