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