EF fluent api vs db set , how do I convert DbSet<Entity> into modelbuilder.Entity<entity> ?

nicedone used Ask the Experts™

I have a context class that does not use DbSets only modelbuilder.Entity, and i am removing some old class files which are used in the application. One of the classes i need to remove has the following structure below(dbset) but when i remove it i get errors because cars are used in the application but i dont know how i can give a property name as cars in    modelBuilder.Entity<MotorVehicle>();

public virtual DbSet<Entity> cars{ get; set; }
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Define Car as a class and set the property type of that class (Car). If not clear, please share your code block. So that I could help you out.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial