public IActionResult Incidents()
        {
            var optionsBuilder = new DbContextOptionsBuilder();

            optionsBuilder.UseSqlServer(ApplicatonDbContext.GetConnectionString());
            using (var dbContext = new ApplicatonDbContext(optionsBuilder.Options))
            {
                var Incidents = dbContext.Incidents.ToList();
                var incidents = new Incidents();
                incidents.incidents = Incidents;
                return(View(incidents));
            }
        }
        public IActionResult DeleteIncident(int incident_id)
        {
            var optionsBuilder = new DbContextOptionsBuilder();

            optionsBuilder.UseSqlServer(ApplicatonDbContext.GetConnectionString());
            using (var dbContext = new ApplicatonDbContext(optionsBuilder.Options))
            {
                var review = new Incident()
                {
                    id = incident_id
                };
                dbContext.Incidents.Remove(review);
                dbContext.SaveChanges();
            }
            return(RedirectToAction("Report"));
        }
        public IActionResult AddIncident(string name, int phone_number, string city, string address, string state, string relation, string description)
        {
            var optionsBuilder = new DbContextOptionsBuilder();

            optionsBuilder.UseSqlServer(ApplicatonDbContext.GetConnectionString());
            using (var dbContext = new ApplicatonDbContext(optionsBuilder.Options))
            {
                dbContext.Database.EnsureCreated();
                var review = new Incident();
                review.name         = name;
                review.phone_number = phone_number;
                review.city         = city;
                review.address      = address;
                review.state        = state;
                review.relation     = relation;
                review.description  = description;

                //Adding to DB
                dbContext.Incidents.Add(review);
                dbContext.SaveChanges();
            }
            return(RedirectToAction("Report"));
        }