If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

N-Tier in C# (2.0)

This small app is a demo of N-Tier using C#. I haven't got a chance yet to do a full-pledge app in C# hence I played with this as a preparation for any impending projects I would tackle using C#.

The base class in DAL uses Factory Class to create a connection object base on the type of derived class, whether it is MS Access or SQL Server; reusabilty is what I have in mind when I decided to go on this design. The DAL also have support for transaction which can be triggered by method SetTransaction, CommitTransaction and RollbackTransaction. I have added in DAL the most common functions I use when dealing with database.

The BLL contains the Entity representation of an Employee and the CRUD operations. It also got an AuditLog where all CRUD operations will be logged in another database; when updating records all changed columns will also be logged. In BLL there is also stuff for Compacting, Repairing and backing-up Access database. Concurrency checking is also supported using the RowVersion method.

There are little thing that I did in the UI that may serve useful to 'newbies' out there like changing the color of the textbox in focus, moving to the next control when hitting the Enter key and moving to the previous control when hitting the Up key, etc...

This also have an Exception Logger where any exceptions can be logged in the Event Log and in a text file.

So check this out! Any comments/criticisms/feedbacks will be highly appreciated. :-)

Re: N-Tier in C# (2.0)

This small app is a demo of N-Tier using C#. I haven't got a chance yet to do a full-pledge app in C# hence I played with this as a preparation for any impending projects I would tackle using C#.

The base class in DAL uses Factory Class to create a connection object base on the type of derived class, whether it is MS Access or SQL Server; reusabilty is what I have in mind when I decided to go on this design. The DAL also have support for transaction which can be triggered by method SetTransaction, CommitTransaction and RollbackTransaction. I have added in DAL the most common functions ..........................

Re: N-Tier in C# (2.0)

Hi
Nice to know about your work. I need some connection help from you regarding your code. You have used MS Access. I would like to connect Oracle DataBase. In DataAccessType Class i can see SQL and MS Access. I would like to add Oracle here. I tried following Code

VB Code:

public class OracleServerDatabase : DataAccess.Methods

{

public OracleServerDatabase(string connectionString)

: base("Oracle Server", connectionString)

}

But i really do not know where i can set it ...

Please tell me how can i connect..

Originally Posted by dee-u

Newer version with improved architecture though it's not yet complete as I am still refining my pattern based on some feedbacks from friends out there... Kamusta mga kabayan!