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

  • Home
  • SEARCH
  • 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 905533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:14:10+00:00 2026-05-15T16:14:10+00:00

Given a (current) project that implements a 2-tier architecture with a well-separated on-tier business

  • 0

Given a (current) project that implements a 2-tier architecture with a well-separated on-tier business layer following the typical generic DAO architecture as pioneered by Bill McCafferty on CodeProject and explained briefly in chapter 10 of NHibernate in Action.

This project must be moved to do CRUD operations and business logic through Microsoft CRM as middle tier using web services. Custom objects and methods are defined in the CRM to mimic the current situation.

I don’t think it’s a good idea to start moving the POCO’s back and forth the same way we used to do. Also, features as lazy loading, caching and concurrency all have to be treated differently. Considering that we have to minimize calls between middle-tier en presentation layer bring around another challenge.

Implementing DTO’s seems the right cause of action, but requires a long path (plus a learning path for the team). I’ve done SOA projects before, but now I’m looking for the path of least resistance. Can we continue to use NHibernate, even if direct DB connection will not be an option? Will we have to rethink the design, or are disconnected entities, introduced in .NET 4.0 perhaps an option? How painless can it become?

  • 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-15T16:14:10+00:00Added an answer on May 15, 2026 at 4:14 pm

    We use XRMLinq – http://www.xrmlinq.com. It builds your DTO objects and you can then use LINQ syntax to query against them. The framework automatically converts your LINQ queries to FetchXML queries against the CRM webservices. The DTO objects are created as partial classes, so you can add your own logic that will survive regenerations.

    Another tip: use custom workflow activities for your business logic where possible. Instead of writing logic directly into the DTO that XRMLinq generates, consider creating a custom workflow activity that will fire when certain fields are updated. This forces your business logic to run even if those fields get updated somewhere else in the system (not through your custom DTO logic). It also gives you a nice queueing system and failback mechanism – if your custom workflow activity throws an exception, the workflow is “paused” until you fix the problem, at which point you can just resume the workflows that failed. This only works for business logic that can be run asynchronously obviously, but for synchronous logic I would still recommend looking at custom plugins before writing logic into the DTO.

    Hope that helps!

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

Sidebar

Related Questions

So I have function that formats a date to coerce to given enum DateType{CURRENT,
I have a function that get the current weeknumber from the given date e.g.
I have been given the following request. Please give 7% of the current contacts
I've been working with a company that, in this current project, has to implement
In my current project, I have an array of QCheckBoxes that I create at
My current project involves setting up a bunch of sidebar links, such that the
On my current project I need to add a functionality that allows the user
On the current project I'm working on, we have the following problem. Our software
I need to get the current context given an entity I found this old
I am attempting to get the current weather given a zip code or a

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.