public Result <UserDto> Fetch(string username)
{
Result <UserDto> retResult = Result <UserDto> .Undefined(null);
try
{
DalHelper.CheckAuthorizationMustRunOnServer();
//Common.CommonHelper.CheckAuthentication();
var userDto = FetchImpl(username);
if (userDto == null)
{
throw new Exceptions.UsernameNotFoundException(username);
}
retResult = Result <UserDto> .Success(userDto);
}
catch (Exception ex)
{
var wrapperEx = new Exceptions.GetUserFailedException(ex, username);
retResult = Result <UserDto> .FailureWithInfo(null, wrapperEx);
}
return(retResult);
}