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


  • 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:

    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

    Friday, December 1, 2017 9:35 AM