Exemplo n.º 1
0
        public IHttpActionResult AddData(customer customerobj)
        {
            AuthDetails authdet = LoginUserDetails();

            customerobj.UpdatedBy = authdet.UserId;
            customerobj.CreatedBy = authdet.UserId;
            var result = service.Add(customerobj);

            return(Ok(result));
        }
Exemplo n.º 2
0
        public ActionResult Add(FormCollection collection)
        {
            var customer = new Customer
            {
                Name        = collection["Name"],
                Email       = collection["Email"],
                PhoneNumber = collection["PhoneNumber"]
            };

            customerService.Add(customer);
            return(RedirectToAction("Index"));
        }