public ActionResult Create([Bind(Include = "Id,Name,Description")] FeedType feedType) { if (ModelState.IsValid) { db.FeedType.Add(feedType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(feedType)); }
public ActionResult Create([Bind(Include = "Id,Title")] Image image) { if (ModelState.IsValid) { db.Image.Add(image); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(image)); }
public ActionResult Create([Bind(Include = "Id,Name,Sign,FirstAid,Description,MedicineTypeId,ImageId,VideoId")] Disease disease) { if (ModelState.IsValid) { db.Disease.Add(disease); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(disease)); }
public ActionResult Create([Bind(Include = "Id,Name,Power,SideEffect,Description,MedicineTypeId,CompanyId,ShopId,ImageId,VideoId")] Medicine medicine) { if (ModelState.IsValid) { db.Medicine.Add(medicine); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(medicine)); }
public ActionResult Create([Bind(Include = "Id,Name")] Country country) { if (ModelState.IsValid) { db.Country.Add(country); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(country)); }
public ActionResult Create([Bind(Include = "Id,Name,Link")] Video video) { if (ModelState.IsValid) { db.Video.Add(video); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(video)); }
public ActionResult Create([Bind(Include = "Id,Name,Contact,Description,CityId,ImageId")] Company company) { if (ModelState.IsValid) { db.Company.Add(company); db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.CityId = new SelectList(db.City, "Id", "Name", company.CityId); return View(company); }
public ActionResult Create([Bind(Include = "Id,Name,Contact,Location,Description,CityId")] Shop shop) { if (ModelState.IsValid) { db.Shop.Add(shop); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CityId = new SelectList(db.City, "Id", "Name", shop.CityId); return(View(shop)); }
public ActionResult Create([Bind(Include = "Id,Name,Description,FeedTypeId,CompanyId,ShopId,ImageId,VideoId")] Feed feed) { if (ModelState.IsValid) { db.Feed.Add(feed); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FeedTypeId = new SelectList(db.FeedType, "Id", "Name", feed.FeedTypeId); return(View(feed)); }
public ActionResult Create([Bind(Include = "Id,Name,CountryId")] City city) { if (ModelState.IsValid) { db.City.Add(city); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CountryId = new SelectList(db.Country, "Id", "Name", city.CountryId); return(View(city)); }
public ActionResult Create([Bind(Include = "Id,Name,CategoryId")] Category category) { if (ModelState.IsValid) { db.Category.Add(category); db.SaveChanges(); ViewBag.TopCategoryList = db.Category.OrderByDescending(c => c.Id).Take(10).ToList(); return(RedirectToAction("Create")); } ViewBag.CategoryId = new SelectList(db.Category, "Id", "Name", category.CategoryId); return(View(category)); }