I have a custom class as follows
public class LogFiles
{
private string _fileName;
private string _path;
private string _logStatus;
public LogFiles(string FName, string Path)
{
this._path = Path;
this._fileName = FName;
}
// the below two properties are mapped from DB entities
public string FName
{
get { return this._fileName; }
set { this._fileName = value; }
}
public string Path
{
get { return this._path; }
set { this._path = value; }
}
// the value for this property will be defined on fly in MainViewModel
public string LogStatus
{
get { return this._logStatus; }
set { this._logStatus = value; }
}
}
I am will set the value for the LogStatus property in my MainViewModel, but to access this property in MainviewModel using linq
something like this,
var get_logStatus = (from a in LogFiles
ordeyby a.LogStatus
select a);
This above code is just a guess similar in writing linq to entities, but is it possible for custom classes to access with linq to sql ? please excuse me and correct the question if it sounds stupid.