Click here to Skip to main content
15,887,596 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
SuggestionRe: Why is it that Metro style apps do not include "Imports System.Data.SqlClient"? Pin
Richard MacCutchan26-Jul-15 1:24
mveRichard MacCutchan26-Jul-15 1:24 
GeneralRe: Why is it that Metro style apps do not include "Imports System.Data.SqlClient"? Pin
Afzaal Ahmad Zeeshan26-Jul-15 2:30
professionalAfzaal Ahmad Zeeshan26-Jul-15 2:30 
AnswerRe: Why is it that Metro style apps do not include "Imports System.Data.SqlClient"? Pin
Afzaal Ahmad Zeeshan26-Jul-15 2:30
professionalAfzaal Ahmad Zeeshan26-Jul-15 2:30 
QuestionHow to find which DIV is selected and get selected DIV element values in jquery Pin
sr15924-Jul-15 0:37
sr15924-Jul-15 0:37 
AnswerRe: How to find which DIV is selected and get selected DIV element values in jquery Pin
Pete O'Hanlon24-Jul-15 1:03
mvePete O'Hanlon24-Jul-15 1:03 
Questioncheck data prior to insert Pin
Member 1185289422-Jul-15 8:04
Member 1185289422-Jul-15 8:04 
AnswerRe: check data prior to insert Pin
Michael_Davies22-Jul-15 8:41
Michael_Davies22-Jul-15 8:41 
AnswerRe: check data prior to insert Pin
Daniel Pfeffer22-Jul-15 9:23
professionalDaniel Pfeffer22-Jul-15 9:23 
I would say that you should separate the program into layers:

1. The User Layer handles user interactions.
2. The Business Layer validates the data and does any necessary processing.
3. The Data Layer stores the data in the database.

In this model, all validation should be done in the Business Layer.

Your code fragment mixes the layers; you have the Data Layer, you want to add validation (part of the Business Layer), and you also have the User Layer (in the last line).

IMO, the only validation that should be performed inside the database is inherent:

1. Unique indexes must be unique.
2. non-Null fields must be non-Null.
etc.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.

--Winston Churchill

QuestionJoining Multiple Tables SQL Query Problem Pin
ratchoy01021-Jul-15 22:16
ratchoy01021-Jul-15 22:16 
AnswerRe: Joining Multiple Tables SQL Query Problem Pin
Richard Deeming22-Jul-15 1:04
mveRichard Deeming22-Jul-15 1:04 
GeneralRe: Joining Multiple Tables SQL Query Problem Pin
ratchoy01022-Jul-15 4:07
ratchoy01022-Jul-15 4:07 
GeneralRe: Joining Multiple Tables SQL Query Problem Pin
Dave Kreskowiak22-Jul-15 4:55
mveDave Kreskowiak22-Jul-15 4:55 
GeneralRe: Joining Multiple Tables SQL Query Problem Pin
Richard Deeming22-Jul-15 7:38
mveRichard Deeming22-Jul-15 7:38 
QuestionIs it possible to add Custom Suggestions to google.maps.places.Autocomplete Pin
sr15915-Jul-15 23:59
sr15915-Jul-15 23:59 
AnswerRe: Is it possible to add Custom Suggestions to google.maps.places.Autocomplete Pin
Dave Kreskowiak17-Jul-15 3:58
mveDave Kreskowiak17-Jul-15 3:58 
QuestionAsp.net front and back end confusion! Pin
George Tourtsinakis10-Jul-15 5:06
George Tourtsinakis10-Jul-15 5:06 
AnswerRe: Asp.net front and back end confusion! Pin
Pete O'Hanlon10-Jul-15 5:28
mvePete O'Hanlon10-Jul-15 5:28 
GeneralRe: Asp.net front and back end confusion! Pin
George Tourtsinakis12-Jul-15 3:59
George Tourtsinakis12-Jul-15 3:59 
GeneralRe: Asp.net front and back end confusion! Pin
Dave Kreskowiak12-Jul-15 4:29
mveDave Kreskowiak12-Jul-15 4:29 
GeneralRe: Asp.net front and back end confusion! Pin
George Tourtsinakis18-Jul-15 23:16
George Tourtsinakis18-Jul-15 23:16 
QuestionClone child gridview in nested gridview Pin
Member 118269799-Jul-15 21:20
Member 118269799-Jul-15 21:20 
AnswerRe: Clone child gridview in nested gridview Pin
User 418025428-Jul-15 8:54
User 418025428-Jul-15 8:54 
QuestionHow to get Memory usage size of each services running on Application Server using C#.net Pin
ven7538-Jul-15 20:18
ven7538-Jul-15 20:18 
AnswerRe: How to get Memory usage size of each services running on Application Server Pin
Michael_Davies8-Jul-15 20:24
Michael_Davies8-Jul-15 20:24 
GeneralRe: How to get Memory usage size of each services running on Application Server using C#.net Pin
ven7538-Jul-15 20:28
ven7538-Jul-15 20:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.