Example #1
0
 //For both Post (add) and Put (update)
 public void Post(BizEmployee employee)
 {
     if (employee != null)
     {
         BizEmployeeService.AddOrUpdate(employee);
     }
 }
Example #2
0
        public HttpResponseMessage Post([FromBody] BizEmployee emp)
        {
            BizEmployeeRep.AddOrUpdate(emp);
            var    msg = Request.CreateResponse(HttpStatusCode.Created, emp);
            string url = Url.Link("DefaultApi", new { id = emp.EmployeeId });

            msg.Headers.Location = new Uri(url);
            return(msg);
        }
Example #3
0
        // GET: ForEmployee
        public ActionResult Index()
        {
            var model = new BizEmployee();

            return(View(model));
        }