Exemplo n.º 1
0
        public void CreateGoodCategory(GoodCategoryViewModel model)
        {
            using (var context = new EntitiesContext())
            {
                var newCategory = new GoodCategory
                {
                    Name = model.Name
                };

                context.GoodCategories.Add(newCategory);
                context.SaveChanges();
            }
        }
        public JsonResult Create(GoodCategoryViewModel model)
        {
            goodCatalogueService.CreateGoodCategory(model);

            return Json(true);
        }