public void TestMethod1() { ItemDB itemdb = new ItemDB(); Item item = new Item(); item.NomeItem = "xablau"; item.CategoriaItem = "gta"; item.QuantidadeItem = 5.0; itemdb.Create(item); }
public ActionResult Create(Item _item) { try { _itemService.CreateBLL(_item); _itemDB.Create(_item); } catch (Exception) { //System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE ="" JavaScript"">alert ("O nome nao pode repetir meo")</SCRIPT>); return(new HttpStatusCodeResult(400)); } return(RedirectToAction("Get")); }