Exemplo n.º 1
0
        public static bool AddCityHelper(CityModel model)
        {
            var repo = new Repository<CityModel>(DbCollection.City);
            if (repo.Gets().Any(m => m.Name.Equals(model.Name)))
            {
                return false;
            }

            repo.Insert(model);
            return true;
        }
Exemplo n.º 2
0
 public ActionResult AddCity(CityModel model)
 {
     return Json(new { result = Helper.Helper.AddCityHelper(model), content = model });
 }