Пример #1
0
        public void CreateCity(City1 City)
        {
            _PPPDB.Add(Mappings.MapCity.Map(City)); // this will generate insertMapper.Map(customer)
            _PPPDB.SaveChanges();                   // this will execute the above generate insert query

            // log in behavior for adding in new City Admin
            _logger.LogInformation(2001, "Added new City {0} to database", City.cityName);
        }
Пример #2
0
        public void CreateCityAdmin(CityAdmin1 CityAdmin)
        {
            _PPPDB.CityAdmin.Add(Mappings.MapCityAdmin.Map(CityAdmin)); // this will generate insertMapper.Map(customer)
            _PPPDB.SaveChanges();                                       // this will execute the above generate insert query

            // log in behavior for adding in new City Admin
            _logger.LogInformation(1001, "Added new City Admin {0} to database\n", CityAdmin.Email);
        }
        public void CreateIssue(Issue1 Issue)
        {
            _PPPDB.Issue.Add(Mappings.MapIssue.Map(Issue)); // this will generate insertMapper.Map(customer)

            _PPPDB.SaveChanges();                           // this will execute the above generate insert query

            // log in behavior for adding in new City Admin
            _logger.LogInformation(3001, "Added new Issue {0} to database", Issue.IssueId);
        }