Linq To SQL Query for counting same records
I have a working code to check input with database & if the same record
found its shown that no other same record can be made
but i want to change it little bit by counting the same numbers of records
& shows the count in text box
var a = from b in ContactDB.GetTable<ContactInfo>() select b;
foreach (var x in a)
{
if (x.Extra == txtname.Text.ToString())
{
// code
}
How to count the total x.Extra found same as thxname.Text & shows the
count in info.TextBox
No comments:
Post a Comment