Exemplo n.º 1
0
        // 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());
        }
Exemplo n.º 2
0
        // GET api/<controller>/5
        public Perform102146016 Get(string id)
        {
            DADModel dBmodel = new DADModel();

            return(dBmodel.Perform102146016.FirstOrDefault(p => p.RecordID == id));
        }
Exemplo n.º 3
0
        // GET api/<controller>
        public IEnumerable <Perform102146016> Get()
        {
            DADModel dBmodel = new DADModel();

            return(dBmodel.Perform102146016.ToList());
        }
Exemplo n.º 4
0
        // GET api/<controller>/5
        public Orders102146016 Get(int id)
        {
            DADModel dBmodel = new DADModel();

            return(dBmodel.Orders102146016.FirstOrDefault(o => o.CustomerNo == id));
        }
Exemplo n.º 5
0
        // GET api/<controller>
        public IEnumerable <Orders102146016> Get()
        {
            DADModel dBmodel = new DADModel();

            return(dBmodel.Orders102146016.ToList());
        }
Exemplo n.º 6
0
        // DELETE api/<controller>/5
        public Customers102146016 Delete(int id)
        {
            DADModel dBmodel = new DADModel();

            return(dBmodel.Customers102146016.FirstOrDefault(c => c.CustomerNo == id));
        }
Exemplo n.º 7
0
        // GET api/<controller>/5
        public Interests102146016 Get(string id)
        {
            DADModel dBmodel = new DADModel();

            return(dBmodel.Interests102146016.FirstOrDefault(i => i.InterestCode == id));
        }
Exemplo n.º 8
0
        // GET api/<controller>
        public IEnumerable <Interests102146016> Get()
        {
            DADModel dBmodel = new DADModel();

            return(dBmodel.Interests102146016.ToList());
        }