Page view counter

Whats a data access layer??

Last post 09-04-2006 3:41 AM by dotnet_lee. 2 replies.

Sort Posts:

  • Whats a data access layer??

    09-02-2006, 6:23 AM
    • Loading...
    • dotnet_lee
    • Joined on 08-25-2006, 8:45 AM
    • UK
    • Posts 177

    I have just done a search for this and no where actually explains what it is?? In one of the tutorials I'm doing

     http://www.asp.net/guidedtour2/s11.aspx

    It tells me I need use one, but doesn't actually explain in english what it is???
     

  • Re: Whats a data access layer??

    09-02-2006, 11:05 AM
    Answer
    • Loading...
    • Javier Luna
    • Joined on 08-29-2006, 4:34 PM
    • Lima, Peru
    • Posts 592

    Hi dotnet_lee, 

    I give to you DataLayer.Primitives and DataLayer.Primitives.Core public version.  That they will be able to download of following place:

    http://gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=1334C3B6-66E1-45A3-B518-9E47C0D73C20

    What is DataLayer.Primitives and DataLayer.Primitives.Core?  And so that it serves?

    It is the .NET solution oriented to the layer data access of a software product that is developed on the technology of .NET Framework.

    The intention is to be able to construct a product based on architecture of three layers.  That it allows to flexibility and scalability within his time of life.

    As it could use it within my development of software?

    Generally, we would have to count on three .NET solutions, for the construction of a software product.

    DataLayer.sln - Oriented to the layer data access.
    BusinessLayer.sln - Oriented to business logic.
    UserLayer.sln - Oriented to user interface.

    In this opportunity, I give to you DataLayer.sln public version.

    That it exists within the DataLayer.sln?

    In this we will find the following projects .csproj:

    CommonLayer.Customs: Custom classes for a special use.
    CommonLayer.Nullables: Data types to null support.
    CommonLayer.Exceptions: Exceptions for its use within the software product.  DataLayer.Primitives and DataLayer.Primitives.Core: Block oriented to the operations through the BD.
    DataLayer.WinApp:  Project that examines this layer of the architecture.

    How interactive DataLayer.Primitives and DataLayer.Primitives.Core with the other layers?

    The BusinessLayer.sln is the place of where you will be able to interact with the DataLayer.Primitives and DataLayer.Primitives.Core and to make use of the classes that this offers to be able to construct the operations for the DB.

    Within the DataLayer.Primitives public version, you found the following classes:

    PrimitiveEntity:  It is a class that must be inherited necessarily to allow taking advantage of the basic operations for a table data base, from perspective CRUD. If you override these methods: OnSelect, OnInsert, OnUpdate and OnDelete, then you to be able to indicate the parameters that will to be used for the execution of each one of the stores procedures that are to conduct these operations.

    PrimitiveExecutable:  It is a class that simply of being instances will allow to be able to execute operations within the database, are these through store procedures or SQL sentences.

    PrimitiveParameter:  It is the class that will allow the simple creation us of different types from parameters to be given in the execution of the stores procedures, to the PrimitiveEntity or the PrimitiveExecutable, depending on which you have used to conduct operations through the DB.

    PrimitiveParameterCollection:  Is one colleccion of PrimitiveParameter based on DictionaryBase, to be able to have an immediate access to each one of the elements of colleccion with single having the name of the parameter.  Very useful when you are desired to return values through the parameters of store procedure.  But always used in all place of the DataLayer.Primitives where parameters are needed.

    PrimitiveProcedure:  This is a structure that encapsulates the basic definition of store procedure.

    PrimitiveSql:  Simple structure to define a SQL sentence.

    How it would have to be structured the BusinessLayer.sln to be able to easily interact with the DataLayer.Primitives and DataLayer.Primtives.Core?

    BusinessLayer.sln would have to count on the following projects:

    BusinessLayer.Components and BusinessLayer.Components.Collections: It is the project in which the classes settle down that encapsulate the logic of the business to which this oriented the product.

    BusinessLayer.Entities: Here the entities are defined that are to be the means by which to be sent information between the user layer and the business logic.

    BusinessLayer.IDataWrapper: It establishes the interfaces to conduct operations allowed through the DB.

    BusinessLayer.DataAccess: This project is the nexus between them business layer and the layer of data.  This it is the place where reference becomes specifies to be able to make use of the classes that offers to the DataLayer.Primitives and DataLayer.Primitives.Core.

    BusinessLayer.WinApp: It is the project that allows testing this layer of the architecture.

    What is not brought this DataLayer.Primitives and DataLayer.Primitives.Core public version?

    All the null data types are not given in this public version.  Single I have released NullInt32, NullString, NullDataTime. They are supported by INullable interface.  This within the CommonLayer.Nullables

    All the range of exceptions used for the construction of the projects that I lead has not been given. Just three basics exceptions. This within the CommonLayer.Exceptions.

    Single the CustomDataSet has been freed.  This within the CommonLayer.Customs.

    In the same way, one has not freed to the support for the transactions through the DB and the support for all the data types, in the creation of PrimitiveParameter, no released.  This within DataLayer.Primitives.

    There is no greater information on the DataLayer.Primitives.Core?

    Let us say that exactly it is the nucleus of the DataLayer.Primitives.  The classes that are defined in that namespace have the particularity of being internal reason why its use does not go beyond of assembly corresponding to the DataLayer.Primitives.

    What you have thought to release coming soon?

    He would be ideal to be able to release a BusinessLayer.sln oriented to a reality of business in individual that allows appreciating the suitable use of the DataLayer.Primitives and DataLayer.Primitives.Core.

    When you think it to do?

    Coming soon… ;)

     

    from Villa El Salvador for world!
  • Re: Whats a data access layer??

    09-04-2006, 3:41 AM
    • Loading...
    • dotnet_lee
    • Joined on 08-25-2006, 8:45 AM
    • UK
    • Posts 177

    Thanks for the reply.... But I managed to find the answer I was looking for on the net...

     Commonly, the data layer classes validate data records before sending them to the database

     

Page 1 of 1 (3 items)
Microsoft Communities