/// <summary> /// Add new CustomerType /// </summary> /// <param name="obj">CustomerType</param> /// <returns></returns> public ApiResponseViewModel Add(CustomerType obj) { var result = new CustomerType(); var response = new ApiResponseViewModel { Code = CommonConstants.ApiResponseSuccessCode, Message = null, Result = null }; try { result = _customerTypeRepository.Add(obj); _unitOfWork.Commit(); response.Message = CommonConstants.AddSuccess; response.Result = result; } catch (Exception ex) { response.Code = CommonConstants.ApiResponseExceptionCode; response.Message = CommonConstants.ErrorMessage + " " + ex.Message; } return(response); }