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 3783712
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:15:58+00:00 2026-05-19T11:15:58+00:00

What have you found to be the best way to document (put comments on)

  • 0

What have you found to be the best way to document (put comments on) a complex ORM query, specifically a LINQ to EF query or an nHibernate criteria query?

  • 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-19T11:15:59+00:00Added an answer on May 19, 2026 at 11:15 am

    Unit tests or specifications against the service layer.

        [TestMethod]
        public void ItemsForBill_returns_expected_items_with_explicit_customer_id()
        {
            var customer = new Customer { Id = new Guid("{AB2F33FA-92E0-4B7C-8720-901CD9918796}") };
            var expectedItemId = new Guid("{B1493898-A832-4D83-A134-77790673A6D6}");
            var start = new DateTime(2010, 1, 1);
            var stop = new DateTime(2010, 1, 31);
            var items = new[] 
            {
                new Item 
                {
                    Description = "Date out of range",
                    ItemDate = new DateTime(2010, 2, 10),
                    Payer = customer,
                    PayerCustomerId = customer.Id
                },
                new Item 
                {
                    Description = "Should be included",
                    Id = expectedItemId,
                    ItemDate = new DateTime(2010, 1, 10),
                    Payer = customer,
                    PayerCustomerId = customer.Id
                },
                new Item 
                {
                    Description = "Wrong payer",
                    ItemDate = new DateTime(2010, 1, 10),
                    Payer = new Customer()
                }
            };
            var uow = new FakeBillingUnitOfWork();
            uow.SetTestData(items.ToList());
            var activity = new SelectItemsForBillingRun();
            var input = new BillingRun
            {
                OneCustomerId = customer.Id,
                Start = start,
                Stop = stop
            };
    
            var result = activity.ItemsForBillingRun(uow, input);
    
            Assert.IsNotNull(result);
            Assert.AreEqual(1, result.Count());
            var returned = result.Single();
            Assert.AreEqual(expectedItemId, returned.Id);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to learn pygame, And I found the best way to have the
For the moment the best way that I have found to be able to
What is the best way people have found to do String to Lower case
What is the best way to go about doing this? I have found some
What is the best way to encrypt a SQL 2005 database? I have found
Below is the best way I have found. Thoughts? If you load this up
I have found the way to copy the record that I would like, but
I want my links not to have the weird outline and the best way
I have found myself designing a language for fun that is a cross between
I have found numerous examples on uploading a file to a web server via

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.