Click here to Skip to main content
15,887,267 members
Home / Discussions / C#
   

C#

 
GeneralRe: Design Question Pin
Freak3010-Jul-13 21:23
Freak3010-Jul-13 21:23 
GeneralRe: Design Question Pin
jschell11-Jul-13 8:47
jschell11-Jul-13 8:47 
GeneralRe: Design Question Pin
Mycroft Holmes11-Jul-13 12:50
professionalMycroft Holmes11-Jul-13 12:50 
AnswerRe: Design Question Pin
Keith Barrow10-Jul-13 22:38
professionalKeith Barrow10-Jul-13 22:38 
AnswerRe: Design Question Pin
Pete O'Hanlon10-Jul-13 23:51
mvePete O'Hanlon10-Jul-13 23:51 
GeneralRe: Design Question Pin
Keith Barrow11-Jul-13 1:45
professionalKeith Barrow11-Jul-13 1:45 
AnswerRe: Design Question Pin
Shameel11-Jul-13 1:06
professionalShameel11-Jul-13 1:06 
AnswerRe: Design Question Pin
jschell11-Jul-13 8:52
jschell11-Jul-13 8:52 
Kevin Marois wrote:
What's the best way to notify the front end of a business rule or possible FK
violation?


Normally the front end should prevent business flows that allow that in the first place.

So if it does occur then an exception is acceptable.


Kevin Marois wrote:
Throwing an exception doesn't seem right



For the most part is it exactly correct. The FK exists to represent a relationship that must always exist. For that failure to occur it means either a programming bug or a work flow problem. Either represents an 'exceptional' situation and thus an exception is in fact entirely appropriate.

In some cases, mostly where the front end might be less stringent then it might be the back ends responsibility to validate for errors. Reporting errors can have variety of solutions but it is something that the layer, not one specific method, should already have an idiom for dealing with. And exceptions are a possible solution although generally it would not be a generic exception but rather a layer specific one.
QuestionUSB drive detection for client-server in C#... Pin
Shibbi10-Jul-13 6:25
Shibbi10-Jul-13 6:25 
AnswerRe: USB drive detection for client-server in C#... PinPopular
NotPolitcallyCorrect10-Jul-13 6:43
NotPolitcallyCorrect10-Jul-13 6:43 
QuestionUSB drive detection for client-server in C# Pin
Shibbi10-Jul-13 6:23
Shibbi10-Jul-13 6:23 
Question.Net Mobile Computing Pin
sijimann10-Jul-13 0:58
sijimann10-Jul-13 0:58 
AnswerRe: .Net Mobile Computing Pin
eddieangel10-Jul-13 10:09
eddieangel10-Jul-13 10:09 
QuestionSqlCe setup issue in C# wpf Pin
McLux9-Jul-13 21:18
McLux9-Jul-13 21:18 
AnswerRe: SqlCe setup issue in C# wpf Pin
Mycroft Holmes9-Jul-13 22:52
professionalMycroft Holmes9-Jul-13 22:52 
GeneralRe: SqlCe setup issue in C# wpf Pin
McLux9-Jul-13 23:00
McLux9-Jul-13 23:00 
GeneralRe: SqlCe setup issue in C# wpf Pin
Mycroft Holmes9-Jul-13 23:04
professionalMycroft Holmes9-Jul-13 23:04 
QuestionSynchronization csv file to SQL Server 2008 R2 Database Pin
Uyen Nguyen Dinh9-Jul-13 18:42
Uyen Nguyen Dinh9-Jul-13 18:42 
AnswerRe: Synchronization csv file to SQL Server 2008 R2 Database Pin
Richard MacCutchan9-Jul-13 21:34
mveRichard MacCutchan9-Jul-13 21:34 
AnswerRe: Synchronization csv file to SQL Server 2008 R2 Database Pin
Mycroft Holmes9-Jul-13 22:49
professionalMycroft Holmes9-Jul-13 22:49 
QuestionTransactionScope in a sub class? Pin
Dominik9-Jul-13 10:36
Dominik9-Jul-13 10:36 
AnswerRe: TransactionScope in a sub class? Pin
Eddy Vluggen10-Jul-13 1:03
professionalEddy Vluggen10-Jul-13 1:03 
GeneralRe: TransactionScope in a sub class? Pin
Dominik11-Jul-13 3:04
Dominik11-Jul-13 3:04 
Questionadd yesterdays value to todays empty value Pin
lordoftrades9-Jul-13 9:53
lordoftrades9-Jul-13 9:53 
AnswerRe: add yesterdays value to todays empty value Pin
Eddy Vluggen10-Jul-13 1:03
professionalEddy Vluggen10-Jul-13 1:03 

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.