// POST api/<controller> public Customers102146016 Post([FromBody] Customer customer) { DADModel context = new DADModel(); context.Customers102146016.Add(new Customers102146016() { CustomerNo = customer.CustomerNo, CustomerAddress = customer.Address, CustomerName = customer.CustomerName, CustomerPcode = customer.PostCode }); context.SaveChanges(); return(Ok()); }
// GET api/<controller>/5 public Perform102146016 Get(string id) { DADModel dBmodel = new DADModel(); return(dBmodel.Perform102146016.FirstOrDefault(p => p.RecordID == id)); }
// GET api/<controller> public IEnumerable <Perform102146016> Get() { DADModel dBmodel = new DADModel(); return(dBmodel.Perform102146016.ToList()); }
// GET api/<controller>/5 public Orders102146016 Get(int id) { DADModel dBmodel = new DADModel(); return(dBmodel.Orders102146016.FirstOrDefault(o => o.CustomerNo == id)); }
// GET api/<controller> public IEnumerable <Orders102146016> Get() { DADModel dBmodel = new DADModel(); return(dBmodel.Orders102146016.ToList()); }
// DELETE api/<controller>/5 public Customers102146016 Delete(int id) { DADModel dBmodel = new DADModel(); return(dBmodel.Customers102146016.FirstOrDefault(c => c.CustomerNo == id)); }
// GET api/<controller>/5 public Interests102146016 Get(string id) { DADModel dBmodel = new DADModel(); return(dBmodel.Interests102146016.FirstOrDefault(i => i.InterestCode == id)); }
// GET api/<controller> public IEnumerable <Interests102146016> Get() { DADModel dBmodel = new DADModel(); return(dBmodel.Interests102146016.ToList()); }