public GetUserInfoResult GetUserInfo(string login)
{
GetUserInfoResult getUserInfoResult = (GetUserInfoResult) null;
using (DatabaseDataContext databaseDataContext = new DatabaseDataContext(this.connectionString))
{
IEnumerable<GetUserInfoResult> source = (IEnumerable<GetUserInfoResult>) Enumerable.ToList<GetUserInfoResult>((IEnumerable<GetUserInfoResult>) databaseDataContext.GetUserInfo(login));
if (source != null)
{
if (Enumerable.Any<GetUserInfoResult>(source))
getUserInfoResult = Enumerable.First<GetUserInfoResult>(source);
}
}
return getUserInfoResult;
}