Exemplo n.º 1
0
        // DELETE api/<controller>/5
        public HttpResponseMessage Delete(int id)
        {
            doctorBLL DoctorBLL = new doctorBLL();
            //return DoctorBLL.GetbyId(id);
            doctorVM doctorinfo = DoctorBLL.GetbyId(id);


            // db.EmployeeInfoes.Remove(doctorinfo);


            if (doctorinfo == null)
            {
                return(Request.CreateResponse(HttpStatusCode.NotFound));
            }
            try
            {
                DoctorBLL.Delete(id);
                //  db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                return(Request.CreateResponse(HttpStatusCode.NotFound));
            }

            return(Request.CreateResponse(HttpStatusCode.OK, doctorinfo));
        }
Exemplo n.º 2
0
        // GET api/<controller>/5
        public doctorVM Get(int id)
        {
            doctorBLL DoctorBLL = new doctorBLL();

            return(DoctorBLL.GetbyId(id));
        }