Пример #1
0
        public District Add(string name)
        {
            var model = this.districts.All().FirstOrDefault(d => d.Name == name);
            if (model == null)
            {
                model = new District()
                {
                    Name = name
                };

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

            return model;
        }
Пример #2
0
 public District Add(District model)
 {
     throw new NotImplementedException();
 }