public async Task <IActionResult> Create([FromBody] MemberPersonalIdentityType model)
        {
            if (model == null)
            {
                httpResult = new FSResponseMessage(FSStatusCode.BadRequest, FSStatusMessage.fail, HttpResponseMessageKey.ArgsNull);
                goto response;
            }

            if (!await ValidateCreateModel(model))
            {
                var _modelState = ModelState
                                  .Where(x => x.Value.ValidationState == ModelValidationState.Invalid)
                                  .ToDictionary(x => x.Key, x => x.Value.Errors[0].ErrorMessage);

                httpResult = new FSResponseData <Dictionary <string, string> >(FSStatusCode.UnprocessableEntity, FSStatusMessage.fail, _modelState);
                goto response;
            }

            try
            {
                model.Init();
                unitOfWorks.MemberPersonalIdentityTypes().Add(model);

                int _status = await unitOfWorks.Save();

                if (_status == 1)
                {
                    httpResult = new FSResponseMessage(FSStatusCode.OK, FSStatusMessage.success, HttpResponseMessageKey.DataSuccessfullyCreated);
                }
                else
                {
                    httpResult = new FSResponseMessage(FSStatusCode.InternalServerErrorException, FSStatusMessage.error, HttpResponseMessageKey.DataUnsuccessfullyCreated);
                }
            }
            catch (Exception ex)
            {
                httpResult = new FSResponseMessage(FSStatusCode.InternalServerErrorException, FSStatusMessage.error, ex.Message);
            }

response:
            return(FSHttpResponse(httpResult));
        }
 private async Task <bool> ValidateUpdateModel(int _memberpersonalidentitytypeid, int _personalidentitytypeid, MemberPersonalIdentityType _model)
 {
     return(ModelState.IsValid);
 }
 private async Task <bool> IsValidToDeleteModel(MemberPersonalIdentityType _model)
 {
     return(true);
 }
 private async Task <bool> ValidateCreateModel(MemberPersonalIdentityType _model)
 {
     return(ModelState.IsValid);
 }