Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 636073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:28:30+00:00 2026-05-13T20:28:30+00:00

I’d like ask a question about building applications in .NET that use data from

  • 0

I’d like ask a question about building applications in .NET that use data from a database. There are many technologies and patterns and I’m trying to connect it all.

I’m building a desktop application with local database, so I choose SQLServer CE + WinForms, but I’d like to keep this as general as possible. I’m not into other technologies (Java, etc.), but if there are some good solutions there, then you’re welcome to write about them.

I’d like to ask for your suggestions, opinions and good practices that you use for building applications. Would you add or remove any of the listed layers? What technologies do you prefer?

So here are the basic layers of the application:

1) SQLServer CE/SQLServer/Oracle/IBM DB2
--------------------------------------------------
2) LINQ to SQL/Entity Framework/NHibernate/ADO.NET
--------------------------------------------------
3) Data Transfer Objects
--------------------------------------------------
4) DTO-to-BM/Data Access Objects
--------------------------------------------------
5) Business Model
--------------------------------------------------
6) MVP/MVC/MVVM/PM
--------------------------------------------------
7) WinForms/WPF/ASP.NET

1) This is the classic relational database. So the first question is whether to use stored procedures and triggers or not? I’ll be using SQLServer CE, so no SPs for me, but I was wondering if peaple are pro or against them. It seems easier to me (more testable, more verifiable) NOT to put logic into the DB. The business rules would be placed in the business layer – maybe in some sort of “framework”.

2) This is the DB access layer.

3) DTOs – simple POCOs. Are they needed?

4) Mapping between DTOs and BM. Hand coded, AutoMapper or maybe inheritance? Or maybe DAO – abstract objects for accessing the database that return objects from BM?

5) Business objects that build the business model. I’d put all the business rules and validation here. But is this layer needed? Or would you put all the business stuff into layer 3?

6) and 7) Building UI using BM.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:28:31+00:00Added an answer on May 13, 2026 at 8:28 pm

    If you want to use some embedded sql database you should have a look at SQLite. It has much more useful features than SQL CE and works faster and without problems. Or even more, I recommend you to use some document or object database (db4o for example). IMO, it’ll simplify your DAOs and code a lot.

    1, I prefer to use ORMs and I use stored procedures and triggers very rarely and only in legacy applications. It’s much more easy to deal with c# code and to have all in one place. And you are right with logic and business rules.

    2, I prefer to use NHibernate as the most mature, powerful and customizable framework. And I also recommend you to look at NhProf (by the word, the same profilers exists for L2S and EF).

    3&4, Just remove it, unnecessary noise and monkey work.

    2&5, Use your database model as BusinessModel (it’s very easy with NHibernate). Check this and this articles.

    6&7, For web I choose MVC with asp.net mvc, for WPF – MVVM. From my experience, don’t use WinForms and Asp.Net when you don’t have restrictions like legacy code. It’s much more easy and fun to develop using Asp.Net Mvc and WPF. And there are a lot of cool and time saving frameworks for them – MvcTurbine, MVC Contrib, SharpArchitecture for asp.net mvc and Caliburn, WPF Toolkit, Cinch, MVVM Light toolkit and many others.

    Also I recommend you to look at the following articles and samples that may help you to design your app better:
    http://nhforge.org/blogs/nhibernate/archive/2009/08/27/nhibernate-and-wpf-validations.aspx
    http://nhforge.org/blogs/nhibernate/archive/2009/11/07/nhibernate-and-wpf-the-guywire.aspx
    http://msdn.microsoft.com/en-us/magazine/ee819139.aspx
    http://code.google.com/p/unhaddins/source/browse/#svn/trunk/Examples/uNHAddIns.Examples.WPF

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I have a view passing on information from a database: def serve_article(request, id): served_article
I have some data like this: 1 2 3 4 5 9 2 6
I would like to count the length of a string with PHP. The string
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.