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

.NET (Core and Framework)

 
JokeRe: Schytzophrenic?? Pin
DaveyM6925-Jun-09 23:24
professionalDaveyM6925-Jun-09 23:24 
QuestionMenuStrip Icon Pin
JediKnight225-Jun-09 4:02
JediKnight225-Jun-09 4:02 
AnswerRe: MenuStrip Icon Pin
MatthysDT6-Jun-11 1:53
MatthysDT6-Jun-11 1:53 
QuestionPerform file operations with elevation. Pin
coder25524-Jun-09 16:44
coder25524-Jun-09 16:44 
AnswerRe: Perform file operations with elevation. Pin
Mark Salsbery24-Jun-09 18:27
Mark Salsbery24-Jun-09 18:27 
QuestionRe: Perform file operations with elevation. [modified] Pin
coder25525-Jun-09 2:47
coder25525-Jun-09 2:47 
AnswerRe: Perform file operations with elevation. Pin
Mark Salsbery25-Jun-09 6:06
Mark Salsbery25-Jun-09 6:06 
Questiononline payment Pin
ruchira jain23-Jun-09 21:28
ruchira jain23-Jun-09 21:28 
AnswerRe: online payment Pin
Pete O'Hanlon23-Jun-09 21:38
mvePete O'Hanlon23-Jun-09 21:38 
AnswerRe: online payment Pin
Baran M24-Jun-09 2:16
Baran M24-Jun-09 2:16 
QuestionSystem Context Menu (Restore,Maximize,Close etc.) on part of client area Pin
pimb223-Jun-09 2:40
pimb223-Jun-09 2:40 
AnswerRe: System Context Menu (Restore,Maximize,Close etc.) on part of client area Pin
Eddy Vluggen25-Jun-09 8:44
professionalEddy Vluggen25-Jun-09 8:44 
GeneralRe: System Context Menu (Restore,Maximize,Close etc.) on part of client area Pin
pimb225-Jun-09 8:47
pimb225-Jun-09 8:47 
GeneralRe: System Context Menu (Restore,Maximize,Close etc.) on part of client area Pin
Eddy Vluggen25-Jun-09 9:11
professionalEddy Vluggen25-Jun-09 9:11 
AnswerRe: System Context Menu (Restore,Maximize,Close etc.) on part of client area Pin
pimb210-Jul-09 4:09
pimb210-Jul-09 4:09 
QuestionHow to check if TcpClient is connected to server? [modified] Pin
s_stoqnov23-Jun-09 0:45
s_stoqnov23-Jun-09 0:45 
AnswerRe: How to check if TcpClient is connected to server? Pin
s_stoqnov23-Jun-09 2:42
s_stoqnov23-Jun-09 2:42 
AnswerRe: How to check if TcpClient is connected to server? Pin
supercat924-Jun-09 5:49
supercat924-Jun-09 5:49 
QuestionCrystal Report Pin
Bahram.Zarrin22-Jun-09 11:06
Bahram.Zarrin22-Jun-09 11:06 
QuestionThree tier architecture, database access layer pattern [modified] Pin
Julen21-Jun-09 2:35
Julen21-Jun-09 2:35 
Hi,

I am designing an architecture in .NET framework. I use the Three tier model to design my application but I have a concern about how is the way to properly model the access to database layer. I have separate DLL for each layer.

In my business layer I want to access the database, for example to add new registry in a way that the members are not passed each one in a parameter but all in a single object. For example:

namespace myapp.bussines_layer
{
class Point
{
  int x;
  int y;

  MyDatabase db = new MyDatabase();

  //I want this...
  void InsertInDatabase()
  {
    db.NewRowInDB(this);
  }

  //... instead of this
  void InsertInDatabase()
  {
    db.NewRowInDB(this.x, this.y);
  }
}
}


The thing is that this way I have circular dependency because Point knows MyDatabase; and MyDatabase has to know Point in order to recognize Point as an parameter in the function.

Does my idea fit correctly in the good practices and designs to access databases? Is better design to pass all the parameters as native types (even when the amount os parameter is high)??

I would be very grateful if anyone could help me and/or give me references to good design patterns with the connection between business and database layers.

Thank you very much in advance.

Julen.
AnswerRe: Tree tier architecture, database access layer pattern Pin
Eddy Vluggen21-Jun-09 3:31
professionalEddy Vluggen21-Jun-09 3:31 
QuestionRe: Tree tier architecture, database access layer pattern Pin
Julen21-Jun-09 3:56
Julen21-Jun-09 3:56 
AnswerRe: Tree tier architecture, database access layer pattern Pin
Eddy Vluggen21-Jun-09 5:19
professionalEddy Vluggen21-Jun-09 5:19 
AnswerRe: Tree tier architecture, database access layer pattern Pin
vasanth111122-Jun-09 0:55
vasanth111122-Jun-09 0:55 
GeneralRe: Tree tier architecture, database access layer pattern Pin
Eddy Vluggen22-Jun-09 12:24
professionalEddy Vluggen22-Jun-09 12:24 

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.