Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Select() not poping up in DbSet Property

$
0
0

This is first time I am trying EF core. I create separate class library for EF core created dbcontext (EXPENSEDBContext) class form the existing database and build successfully.

While I tried to select a record through the object of EXPENSEDBContext I could not able to see the Select() and Where()  as below

var selectvalues = db.Catagory.Select();

So as an alternate I used foreach instead of Select() as below

using (var db = new EXPENSEDBContext())
            {
                //
                var selectvalues = db.Catagory;

                 foreach(var b in selectvalues)
                {
                    Console.WriteLine(b.Name);

                }

            }

My question is why Select method is not poping up in 'db.Catagory'.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>