示例#1
0
        public static bool AddCountryHelper(CountryModel model)
        {
            var repo = new Repository<CountryModel>(DbCollection.Country);
            if (repo.Gets().Any(m => m.Name.Equals(model.Name)))
            {
                return false;
            }

            repo.Insert(model);
            return true;
        }
示例#2
0
 public ActionResult AddCountry(CountryModel model)
 {
     return Json(new { result = Helper.Helper.AddCountryHelper(model), content = model });
 }