public JsonResult AddCatalog(string name)
 {
     MyDatabaseEntities ctx = new MyDatabaseEntities();
     Catalog u = new Catalog();
     u.Name = name;
     ctx.Catalogs.Add(u);
     ctx.SaveChanges();
     string response = "success";
     return this.Json(response, JsonRequestBehavior.AllowGet);
 }
Пример #2
0
 public Order()
 {
     Catalog = new Catalog();
 }