public async Task <ProfileAddResponse> CreateProfile(MCProfilePostModel obj, int userId) { var model = new ProfileAddRequest { Obj = obj }; var result = await BeforeSendRequest <ProfileAddResponse, ProfileAddRequest>(_create_profile_Api, model, userId); return(result); }
public async Task <BaseResponse <ProfileAddResponse> > CreateProfile(MCProfilePostModel obj) { var model = new ProfileAddRequest { Obj = obj }; var result = await BeforeSendRequest <ProfileAddResponse, ProfileAddRequest>(_mcApiconfig.CreateProfileApi, model); return(result); }
public HttpResponseMessage ProfileInsert([FromBody] ProfileAddRequest payload) { try { ItemResponse <int> response = new ItemResponse <int>(); response.Item = _profileService.InsertProfile(payload); return(Request.CreateResponse(response)); } catch (Exception ex) { ErrorLogService svc = new ErrorLogService(); ErrorLogAddRequest error = new ErrorLogAddRequest(); error.ErrorFunction = "aic.Web.Controllers.Api.ProfileInsert"; error.ErrorMessage = ex.Message; error.UserId = UserService.UserSelect().PersonId; svc.ErrorLogInsert(error); return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }