示例#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;
        }
示例#2
0
 public City Add(City model)
 {
     throw new NotImplementedException();
 }