- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
The proper enterprise solution would be a stored procedure spGetDropdownValues. If it becomes necessary to have this configurable at a later date, it can be modified to take a table valued type parameter and the required values can be passed in
Admin
This word is spelled incorrectly, I think, in this case. It should be:
Admin
About the only thing missing here is passing the string into SQL as a single field like "entry1,entry2,entry3" then using exceedingly clunky SQL-side string mangling to break it into separate records to be returned as a set. Complete with latent bugs if the input count ever changes or gets an unwanted space character or delimiter within it.
Admin
Which would be a much better solution than what has been submitted. The full enterprise go-around may be top-heavy, but at least it is exensible in a systematic manner.
Admin
(Only took a quick glance, on a small screen), but could that not simple be LINQ with no DB involved???
Admin
Somewhere between latency and Heisenberg ... lies the bug.
Admin
The only complexity that these three literals ought to ever be involved with is translation into the users' languages.
Admin
You're thinking small here. The real enterprise solution would be a micro-service architecture with 4 APIs: one API for each option, and an orchestration API to request the individual options from the first 3 APIs. And each API gets its own database.
Get on with the times, jeez.
Admin
I think you're getting down to the pico-service level there...
Admin
I wonder if this is really as stupid as it appears or whether it's compliance with a stupidly-written requirement to use the database for everything.
Admin
:why-not-both:
Admin
I don't think "put these values into the database" is necessarily a bad idea but I have a feeling it was misunderstood quite thoroughly!