|
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.
|
|
|
|
|
Vegan to beef eater: "I know seeing people eat a salad makes you question your own masculinity, but please can you STFU and let me eat in peace?"
|
|
|
|
|
I had some vegan "meat croquettes" recently, and to my surprise I could not taste the difference with real ones
|
|
|
|
|
Gee Rick - you're looking a little pale...
Socialism is the Axe Body Spray of political ideologies: It never does what it claims to do, but people too young to know better keep buying it anyway. (Glenn Reynolds)
|
|
|
|
|
But isn't a grass fed steak vegan?
|
|
|
|
|
If you drink - which one? And why?
(yes I'm bored over the stupidity of all these meetings and preparations for meetings)
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: If you drink - which one? Whatever is on sale.
Kornfeld Eliyahu Peter wrote: And why? I don't taste any difference anyway.
Can you? And why would you drink cola when there's coffee?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I do taste Diet very different from Coke (it has a very strong after-taste, like biting metal)... So for long I didn't went for the Zero...
Today it is my first try - it is not identical (feel less sweet), but do not left such after in my mouth as Diet did...
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018
|
|
|
|