|
You talk about ADO, but please consider that EF is newer and has great support.
It's regularly updated and easy to use.
There is no case for ADO anymore.
Please see also the scenario for MVC5 where you can scaffold controllers using EF.
MVC stands for Model-View-Controller and you should separate your business logic from your views and your data layer from your BL.
Speaking of which, F# has great features which allow for great multi-threading code and because of its immutable nature you do not need to worry about race conditions.
But really in conclusion you should switch to Python.
Here is a link you can use: Java tutorial: Learn Java Programming with examples[^]
Please mark this as the accepted answer and don't forget to upvote.
Also, I downvoted your question because you didn't mention which version of PHP you're using.
|
|
|
|
|
I downvoted you because you didn't mention his SQL Injection problem.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Sander Rossel wrote: There is no case for ADO anymore.
Absolute statements are NEVER correct!
|
|
|
|
|
Only a Sith deals in absolutes...
Yes, yes... Let the hate flow through you
|
|
|
|
|
Sander Rossel wrote: You talk about ADO, but please consider that EF is newer and has great support.
You mean the kind of support where Microsoft says they're not going to fix reported bugs in EF6 - as far back as 2011?
Sander Rossel wrote: It's regularly updated and easy to use.
Regularly, as in only major revisions that require even more .Net bloatware be added to your app?
Sander Rossel wrote: There is no case for ADO anymore.
If that's the case, why did Microsoft recently announce that ADO.Net had been ported over to .Net Core?
I was ready for all of those statements.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Too bad you stopped there
Well, I guess things started deteriorating even further after that
|
|
|
|
|
EF wouldn't, couldn't even, exists without ADO...
I mean I am not 100% sure what he means by ADO. But for me, ADO is just the SqlConnection, SqlCommand, SqlParameters classes...
|
|
|
|
|
Yeah, that's ADO, ActiveX Data Objects.
Technically it's the common base classes and interfaces so that each database has uniform access and so the database can be swapped without hassle.
In practice, switching databases mid-project is always a hassle because they all work slightly different.
|
|
|
|
|
You write a "wrapper"? (data repository; DAL)
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Yeah, I have a DAL that is inherited by a database-specific BLL that is called from various locations in the app.
The DAL exposes four public methods that use generics and reflect to populate the specified object
public List<T> ExecuteStoredProc<T>(string storedProc, params SqlParameter[] parameters)
public int ExecuteStoredProc(string storedProc, params SqlParameter[] parameters)
public List<T> ExecuteQuery<T>(string query, params SqlParameter[] parameters)
public int ExecuteQuery(string query, params SqlParameter[] parameters)
There's a BLL for each database that contains (or will contain) a method for each stored proc for that database. Usage goes like this:
DBObjectDBName dbo = new DBObjectDBName(Globals.ConnectionStrings.GetConnectionSTring("DBName");
List<MyDataModel> model = dbo.ExecuteStoredProc<MyDataModel>("dbo.StoredProcName", parameters (if any));
I have a base Controller class where I can create a property to create the DBObject instance, thus reducing the usage block to a single line in the outward facing code. One of these days, I'm going to write an article about it.
I don't need EF watching over me. I know how to write code.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Map your new ADO.NET datatable(s) to the old (EF) entities / POCO's using reflection (columns to properties). The "entity adapter" (Fill).
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
I have never used EF so don't understand the authentication requirement you speak of. We used a separate DLL for WPF which connected to a single database where we maintained all the authorisation for each application. Authentication was always through AD.
We then moved to a service that did the authentication via AD and authorisation from the same database but it serviced all clients, WPF and Silverlght, then MVC. Twas a bitch to maintain but it did eliminated any other provider.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
MVC gave me all the identity stuff, but brought ef along for the ride. I’ve been looking for code that already exists that I can make changes to, but nobody is sharing that I can find.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
#realJSOP wrote: but nobody is sharing that I can find Really I'd rather not have you as an active enemy, I don't mind sharing good code but not that mess, it is one of the few projects I'm not proud of.
The original concept was fine but when they wanted to secure each cell in a multi page grid with the authorisation changing based on the content the whole thing became impossible to maintain.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
No worries. We had three devs at work semi-independently trying to fit EF into our existing database environment, and after a few weeks of frustration and outright WTF moments, we all gave up (I was the last one to quit). I'm going to start making my demo video this week, and when presented, I'm sure I'll get push-back from at least one guy asking why I didn't take EF completely out of the code (he's not keen on the idea of a redesign to begin with).
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Mycroft Holmes wrote: they wanted to secure each cell in a multi page grid with the authorisation changing based on the content I am familiar with that sort of mess too, sometimes developers should just have the authority to say "No!"
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Now you know the other side of the game.
Don't get me wrong, all my sympathy too you. I've noticed more than once such an attitude.
|
|
|
|
|
FTFY
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
would be a big missed steak!
Yeah I'm bored too!
I do all my own stunts, but never intentionally!
JaxCoder.com
|
|
|
|
|
The best reason to become a vegan is "I just hate vegetables".
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: The best reason to become a vegan is "I just hate vegetables". So you just do it as a revenge?
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
There's another reason?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
How would I know? I never serached for even one
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Beef eater to Vegan: "My food source poops on your food source".
If you can keep your head while those about you are losing theirs, perhaps you don't understand the situation.
|
|
|
|
|
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|