none
How to pull particular row from table using entity framework. RRS feed

Answers

  • Hi Risu Raj,

    >>How can i get particular record from table using entity framework.

    You could filter the records via where condition. like this:

     using (var db = new EFDemoContext())
    {
                   
        var query = db.TestTable1s.Where(t => t.Id == 1);
        //this.dataGridView1.DataSource = query;
    }

    For more information about entity framework querying, please refer to:

    https://msdn.microsoft.com/en-us/library/jj573936(v=vs.113).aspx

    Best regards,

    Zhanglong Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, December 1, 2017 9:35 AM
    Moderator