public HttpResponseMessage Post(tblBidder bidder) { DbContextTransaction transaction = entities.Database.BeginTransaction(); try { entities.sp_approveBidder(bidder.bId, bidder.ApprovedBy, bidder.ApprovedDate, bidder.bPassword, bidder.bEmailId); entities.SaveChanges(); transaction.Commit(); } catch (Exception) { transaction.Rollback(); return(Request.CreateErrorResponse(HttpStatusCode.Conflict, "Not able to approve the user")); } return(Request.CreateResponse(HttpStatusCode.OK)); }