Tuesday, November 5, 2019

Lots of SQL today

As part of my big project, today I dealt with some table creation and query writing. Mentioned earlier, I use Dapper as ORM and this means no EF queries are generated automatically.
So all Insert, Update, Select etc queries have to be written manually and returned and mapped to POCO entities (simple classes) via Dapper.



I think 2 hours was spent today on this.

I created 3 big tables (10+ fields) and wrote all CRUD queries as mentioned above.

Then, using a helper class, the ORM mappings are written in one place, just to call these functions within the application, when needed.

Some demo, from Tim Corey: https://youtu.be/QVkpzuiiVtw

An the foundation, for Stored Procedures, I used this: https://youtu.be/Sggdhot-MoM

What do you think? IS EF much more efficient?

By the way, my small prototype project in .Net core Razor Pages uses EF Core, which I wanted to learn step by step to get accustomed to it. It is nice, too, I like it! For a simple web project, it is enough for my purposes.

No comments:

Post a Comment