c# - Can LINQ To SQL detect where a table association breaks? -
I have two tables that I am using to fill the gridview. There is a common field in the tables, which is the RangeActivide ID. My problem is that the database is too old and some of the older entries do not match the ID between tables, so I am unable to add a union between them in the database.
I do not care about old data which does not match, so in my .dbml file, I manually created a union to select good data from both tables . This is my LINQ query:
var Connection to Group = P. By ordering the range method, select p.RangeActivityIDNew {TestName = p.TestName, DateTime = p.ActivityDateTime, Notes = p. Notes, // RoundsSecilonNumber = P. Rundfeir.roadsexual number, // roundout = p. Roundfire round type, // lotstock number = p. Roundfire.lotnumber};
I can set my grid datasource to 'collective' and everything works, but if I repeat the three commented lines, then no results from the query Because the table shows the data that the Association criteria is, is the LINQ query a way of ignoring those results that do not match?
Thanks in advance!
where p.RoundFire! = Null
Try adding criteria.
Comments
Post a Comment