-
Dec 7th, 2020, 06:25 PM
#1
VB.NET Core projects/Entity Framework Core
Entity Framework is not for everyone while it seems that for reverse engineering an existing database VB.NET takes a backseat to C# where there are Visual Studio extensions (like EF Power Tools) and T4 templates to reverse engineer databases.
So I've started a GitHub repository for teaching how to use Entity Framework Core with VB.NET in .NET Core projects. Currently just writing code but will have an article out by the end of December.
The article will have walkthroughs on how to created necessary classes for basic operations one would expect in an application with focus more on the backend rather than the frontend. Also using appsettings.json with a generic reader.
If interested here is the repository.
Requires Visual Studio 2019 and SQL-Server (Express edition is fine). To run the code, clone the repository, perform a NuGet restore packages and run the SQL script to create a modified version of Microsoft NorthWind database.
-
Dec 12th, 2020, 12:24 PM
#2
Re: VB.NET Core projects/Entity Framework Core
I tried to learn Entity Framework once, and while I was impressed with what it can do, I ran into it's limits very quickly. It's been years so I can't remember the details but I recall it being very difficult to do anything but very simple updates. When you start having complex update requirements, it was a nightmare to get EF to do it. What I mean by complex updates is the type of updates where you're updating multiple tables, many times with inputs from both the client and data in other tables and sometimes you want to do it all within a transaction. I also recall it being unable to work with certain database structures, especially ones with a lot of PK-FK links. Like I said, I don't remember details but I do remember it giving me a very hard time.
I gave up eventually and went back to doing things the old fashion way. But I've always loved the potential of the technology. I'd definitely like to check out EF again one day. See where it's at today. It's also possible that my failure with it was due to a lack of understanding.
Last edited by Niya; Dec 12th, 2020 at 12:27 PM.
-
Dec 12th, 2020, 12:28 PM
#3
Re: VB.NET Core projects/Entity Framework Core
Originally Posted by Niya
I tried to learn Entity Framework once, and while I was impressed with what it can do, I ran into it's limits very quickly. It's been years so I can't remember the details but I recall it being very difficult to do anything but very simple updates. When you start having complex update requirements, it was a nightmare to get EF to do it. What I mean by complex updates is the type of updates where you're updating multiple tables, many times with inputs from both the client and data in other tables.
I gave up eventually and went back to doing things the old fashion way. But I've always loved the potential of the technology. I'd definitely like to check out EF again one day. See where it's at today.
If I am doing anything "serious" with data access I would tend to still go with EF, I really like the querying side of things, and not having to deal with DataSets or populate my own data objects saves a lot of effort. Any complex queries or updates I would use views / stored procs but still access them via EF.
-
Dec 12th, 2020, 12:35 PM
#4
Re: VB.NET Core projects/Entity Framework Core
Originally Posted by PlausiblyDamp
If I am doing anything "serious" with data access I would tend to still go with EF, I really like the querying side of things, and not having to deal with DataSets or populate my own data objects saves a lot of effort.
This is exactly what drew me to EF in the first place. I absolutely loved that aspect of it. It felt so incredible to be able to use normal objects to manipulate the database. But as I went along with it, I found myself asking more and more how to do this or that and not getting the information I needed. It reached the point where I had way more questions than answers and it just wasn't worth the headache for me anymore.
Originally Posted by PlausiblyDamp
Any complex queries or updates I would use views / stored procs but still access them via EF.
I thought about that as well but I decided against it. Can't remember the reason why though. I have a next CRUD project coming up and before I start it, I think I'll revisit EF and give it another shot.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|