public bool CreateStore() { Stream req = Request.InputStream; req.Seek(0, System.IO.SeekOrigin.Begin); string json = new StreamReader(req).ReadToEnd(); var store = JsonConvert.DeserializeObject <Dictionary <string, string> >(json); Store newStore = new Store(); if (store.ContainsKey("Name") && "" != store["Name"]) { newStore.Name = store["Name"]; } else { return(false); } if (store.ContainsKey("Address")) { newStore.Address = store["Address"]; } return(storeDAL.AddStore(newStore)); }
public int Create(Store store) { return(objStore.AddStore(store)); }
public Store Post(Store store) { return(ObjectStore.AddStore(store)); }