public override IUser GetUserById(string userId) { var user = UserCache.GetUserById(userId); if (user != null) { return(user); } var dsUser = CurrentDB.ExecuteDataSet("dbo.USER_GetByID", CurrentDB.CreateInputParameter("@guidUserID", DbType.Guid, new Guid(userId))); user = GetUserFromDataSet(dsUser); UserCache.AddUserToCache(user); return(user); }
public override IUser GetUserByUserName(string userName, string domain) { var user = UserCache.GetUserByUserName(userName, domain); if (user != null) { return(user); } var dsUser = CurrentDB.ExecuteDataSet("dbo.USER_GetByUsername", CurrentDB.CreateStringInputParameter("@chvnUsername", DbType.String, userName), CurrentDB.CreateStringInputParameter("@chvDomain", DbType.AnsiString, domain ?? string.Empty)); user = GetUserFromDataSet(dsUser); UserCache.AddUserToCache(user); return(user); }