Example #1
0
        public City Add(string name)
        {
            var model = this.cities.All().FirstOrDefault(d => d.Name == name);
            if (model == null)
            {
                model = new City()
                {
                    Name = name
                };

                this.cities.Add(model);
                this.cities.SaveChanges();
            }

            return model;
        }
Example #2
0
 public City Add(City model)
 {
     throw new NotImplementedException();
 }