/// <summary> /// Edit_News /// </summary> /// <param name="request">Edit_NewsRequest</param> /// <returns></returns> public async Task <bool> Edit_News(Edit_NewsRequest request) { bool result = false; try { var param = new EditNewsParameter() { ID = request.ID, NameNews = request.NameNews, IDCreater = request.IDCreater, Date = DateTime.Now, ImageNews = request.ImageNews, ImageNewDetail = request.ImageNewDetail, ViewMax = request.ViewMax, DescriptionNews = request.DescriptionNews, }; _dataAccess.Edit_News(param); result = true; return(result); } catch (Exception ex) { result = false; return(result); } return(await Task.FromResult(result)); }
public IHttpActionResult EditNews(Edit_NewsRequest RequestData) { var result = _businessLogic.Edit_News(RequestData); return(new ActionResult <bool>(result.Result, Request)); }