public async Task <GenericResponse <UserRoleDto> > Get(long id)
        {
            UserRoleBo bo = null;
            ServiceResult <UserRoleBo> result = await serviceManager.UserRole_Service.GetByIdAsync(id);

            if (result.Success)
            {
                bo = result.Data;
            }
            else
            {
                Log(result.Error, LogLevel.Error, this.ControllerContext.RouteData.Values);
            }

            if (bo == null)
            {
                return(GenericResponse <UserRoleDto> .Error(ResultType.Error, "Not Found!", "UR_G_01", StatusCodes.Status404NotFound));
            }

            return(GenericResponse <UserRoleDto> .Ok(UserRoleBo.ConvertToDto(bo)));
        }
        public async Task <GenericResponse <UserRoleDto> > Post([FromBody] UserRoleDto dto)
        {
            UserRoleBo bo = UserRoleBo.ConvertToBusinessObject(dto);
            ServiceResult <UserRoleBo> result = await serviceManager.UserRole_Service.CreateAsync(bo);

            if (result.Success)
            {
                bo = result.Data;

                await serviceManager.CommitAsync();
            }
            else
            {
                return(GenericResponse <UserRoleDto> .Error(ResultType.Error, result.Error, "UR_PST_01", StatusCodes.Status500InternalServerError));
            }

            if (bo == null)
            {
                return(GenericResponse <UserRoleDto> .Error(ResultType.Error, "Not Found!", "UR_PST_02", StatusCodes.Status404NotFound));
            }

            return(GenericResponse <UserRoleDto> .Ok(UserRoleBo.ConvertToDto(bo)));
        }