public async Task<int> SaveCatelog(CateglogProducts modelVM) { try { return await StdRepo.ExcuteStoredProcedureToSave<CateglogProducts>(GlobalSPNames.AddCatelogProductSPName, modelVM); } catch (Exception ex) { throw ex; } }
public async Task <HttpResponseMessage> SaveCatelog(CateglogProducts modelVM, int action) { try { string username = RequestContext.Principal.Identity.Name; string clientAddress = HttpContext.Current.Request.UserHostAddress; return(Request.CreateResponse(HttpStatusCode.OK, await corepo.SaveCatelog(modelVM))); } catch (Exception ex) { LogHelper.WriteLog(HttpContext.Current.Request, ex, RequestContext.Principal.Identity.Name); return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex)); } }