I need to check my tblProjects table, in the foreign key column "ClientID", for a value that matches the "ClientLoginID"(primary key) value in my tblClientLoginDetails table and I want to display the total amount of columns that match that value in a label.
Here is coding where I have tried to do so, but it doesn't display any info in my label. I think it might be because of it getting multiple values and not knowing what to do with it.
using (DataClassesDataContext DC = new DataClassesDataContext())
{
int CurrentClient = CLD.UserID;
var Count = DC.tblProjects.Where<tblProject>
(c => c.ClientID == CurrentClient);
lblTotalProjectsAmount.Content = Count;
}
Also I am not getting any errors with the code above?
Sorry if the question sounds vague, but I do not know how to ask it in another way. For any advice or answers, I would be very greatfull!