public IHttpActionResult GetPost(Guid postId) { using (var bal = new UserPostBAL()) { var post = bal.GetUserPost(postId); return(Ok(post)); } }
public IHttpActionResult GetPost(Guid postId) { return(Run(() => { using (var bal = new UserPostBAL()) { return bal.GetUserPost(postId); } })); }