Design pattern for data layer [.net] [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I work on school enterprise project and I need create data layer with design patterns. Can you give me some hint where to start and how patters could I use ? Thanks
Edit:
I have not use frameworks for ORM.

You could try the repository pattern and unit of work pattern

One of the common pattern for the data layer is the Data Access Objects. Anyway you can also use ready-to-use libraries such as the Microsoft Solution Entity Framework or NHibernate.
Also you can read this link with a lot of suggestions

Related

What is the flow of nhibernate Pure? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to know the flow of NHibernate pure c#.
What is the difference of castle active record and NHibernate pure?
Kindly teach me if there is someone who know well about them.
I assume pure means without Castle or Fluent.
There is much to explain which cannot be covered in this answer so I will just note the steps.
Create Entity (POCO) classes based on your database structure.
Create mapping (.hbm.xml) files based on your Entity classes and database structure. To avoid mapping files, you can choose Fluent way which is other topic for discussion.
Decide the location for configuration (web.config/app.config/code) and do the necessary configurations.
Write CRUD methods in your DAL using various (Linq/Query/Criteria/QueryOver/HQL) ways available.
Call BuildSessionFactory at startup of application.
Call DAL methods.
NHibernate documentation is good source of information.
This article1 and article2 should be good starting point for you.
For Castle, I suggest you ask separate question.

Repository Pattern with NPoco, Worth it? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am considering NPoco for a large business application. I am a bit concerned that is it worth to develop a repository pattern?
I will need to handle complex SQL statements and extensive database operations on several entities in a same use case.
NPoco provides a variety of db operations functions, which I think will not be (directly) exposed to the consumer layer(s) by my repository layer.
Edit-1
Which approach is better to get most out of NPoco?
If you want to invest time in unit tests, then the Repository Pattern is worth it. However if most of your application logic is in stored procs and functions, then you will be limited with unit tests and just spend your time in integration testing.

.net hide implementation and provide interface [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am working with several developers who develop .net components for me.
I manage the licensing mechanism and want to hide the implementation.
I would like to just provide them the interface, with for example the methodIsLicenseValid() so they must use it in the code but cannot access the implementation.
Which pattern or technology should I use to reach that objective?
You should be using a Web Service to expose the methodIsLicenseValid(), and let your devs invoke it whenever necessary.
This will be suitable for your production environment anyways and also will allow you to change the implementation of the methodIsLicenseValid(), without causing hasles to the devs, as opposed to providing a library/dll to them

EF is Database driven development? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Is 'Database Driven Development in windows' same as Application development uses Entity Framework. or is this (DB Driven Dev) has to use different framework or design?
Please comment. Thanks.
Database Driven Design is basically where you have the database design done first, then you program an application based upon the database. Database driven design
Entity Framework is a Object Relational Mapping tool. Using EF, you can do a "code-first" database design where EF will create your database for you, but that's still not database driven design.

working with test data in winforms [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm learning winforms and I'm wonder is it possible to work with some test data like in unit tests that on every startup of aplication dummy data load and work with them for simple crud operations?
Thanks
Use NBuilder. But you will have to create a separate test data layer. I have been using this for quite a while now. Really good for mockup/dummy screens where some random data is required.

Categories

Resources