I am working with LINQ TO SQL in C # to connect to an SQL database
and I have a table in the DataBase called Person that contains information about the faces and has the following fields Person_Id , First_Name , Last_Name , Email , Password
I have the following query that returns a single row if it is matched:
LINQDataContext data = new LINQDataContext(); var query = from a in data.Persons where a.Email == "Any Email String" select a;
my question is how to convert query to an instance of the Equivalent class, which defines:
class Person { public int person_id; public string First_Name; public string Last_Name; public string E_mail; public string Password; public Person() { } }
source share