One way of doing
var _mipUserVoCol = from _mipUserVOSingle in _mipUserVOCollection
where _mipUserVOSingle.UserName == Request.QueryString["UserName"].ToString()
select _mipUserVOSingle;
Second way of doing - simple
MIPUsersVO _simpleCol = _mipUserVOCollection.Where(n => n.UserName == Request.QueryString["UserName"].ToString()).First ();
Assign2Textboxes(_simpleCol);
Comparing two DataSet using LInq
public void CompareActiveDirUsersWithDB()
{
DataSet _dataSetDbUsers=DataManager.GetUsersFromDB();
DataSet _activeDirUsers = ActiveDirectoryUsers();
IEnumerable
where _datarow.Field
select _datarow;
IEnumerable
where _dataRow.Field
select _dataRow;
IEnumerable
IEnumerable
IEnumerable
IEnumerable
IEnumerable
}
taking the data from two different Ilist or list
var q = (from _tblUser in _tblUserDAO
join EmpType in _tblEmpTypeVOList on _tblUser.EmployeetypeIDFK equals EmpType.EmployeeTypeID
select new
{
UserName = string.IsNullOrEmpty(_tblUser.UserName) ? "N/A" : _tblUser.UserName,
FirstName = _tblUser.FirstName,
LastName = _tblUser.LastName,
Email = _tblUser.Email,
Phone = _tblUser.Phone,
Status = _tblUser.IsActive == 1 ? "Active" : "Inactive",
EmployeeTypeName = EmpType.EmployeeTypeName.ToLower() == "attorney" ? "A" : "I"
});
return q.ToList();
No comments:
Post a Comment