c# - Retrieve data from the entity framework table in my execute method -
i need data table have created using entity framework. right now, web api project responsible generate table out of test data i've created. the web api project has folder called dal bookingscontext class in. looks this: public class bookingscontext : dbcontext { public bookingscontext() : base("bookingscontext") { } // dbset bookings public dbset<booking> bookings { get; set; } protected override void onmodelcreating(dbmodelbuilder modelbuilder) { modelbuilder.conventions.remove<pluralizingtablenameconvention>(); } } if create instant of class in controller, can call dbset method bookings database. the problem have created class library called getbookings. responsible bookings database. the class should data database table getallbookingsquery. // generic interface public interface iquery<out t> { t execute(); } class getallbookingsquery : iquery<list<booking>> { // list of b...