Relative Content

Tag Archive for .netentity-framework

How can I optimize and simplify my query logic?

I’m working on a method that retrieves a list of Student entities from a database based on several optional filtering and sorting criteria. The query is quite complex due to the following reasons:

How can I optimize and simplify my query logic?

I’m working on a method that retrieves a list of Student entities from a database based on several optional filtering and sorting criteria. The query is quite complex due to the following reasons:

Entity Framework does not consider applied migrations

I recently started to work on a .NET project using Entity Framework (5.0.11). This project already has 5 registered migrations, and after creating a new model (+ register it to DbContext), I generated a new migration.

How do migrations using VS Code on Ubuntu

By running the following code on VS Code terminal. I had installed all the dependencies, dotnet SDK, dotnet runtime, and EF core. I am not running any DBMS like Sqllite / MSSQL server even on a docker container and get these errors for both sql providors.

No erorrs but Entity Framework not creating database

After running the command add-migration InitialMigration I get the “Build succeeded” message and then after running the update-database I get the “Done.” message. No errors are shown. However, do database is created. How can I find out what is going on? I tried refreshing my database connection but still no database.