Exemplo n.º 1
0
        public ActionResult Register(tblAngularCustomer customer)
        {
            db.tblAngularCustomers.Add(customer);
            db.SaveChanges();

            return(RedirectToAction("CustomerPages/Data"));
        }
Exemplo n.º 2
0
        public void DeleteCustomer(int Id)
        {
            tblAngularCustomer customer = db.tblAngularCustomers.Where(x => x.Id == Id).FirstOrDefault();

            db.tblAngularCustomers.Remove(customer);
            db.SaveChanges();
        }
Exemplo n.º 3
0
        public void PutCustomer(tblAngularCustomer customer)
        {
            tblAngularCustomer obj = db.tblAngularCustomers.Single(x => x.Id == customer.Id);

            obj.Name      = customer.Name;
            obj.Age       = customer.Age;
            obj.City      = customer.City;
            obj.Languages = customer.Languages;
            obj.Skills    = customer.Skills;

            db.SaveChanges();
        }
Exemplo n.º 4
0
 public void PostCustomer(tblAngularCustomer customer)
 {
     db.tblAngularCustomers.Add(customer);
     db.SaveChanges();
 }