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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:59:09+00:00 2026-05-31T03:59:09+00:00

Assume I have a business object that has some properties that should be read-only.

  • 0

Assume I have a business object that has some properties that should
be read-only. For example:

public class Order
{
     ...
     public DateTime OrderDate { get; set; }
     ...
     public decimal OrderTotal { get; set; }
}

Also assume that OrderTotal is a calculated value returned by a stored proc that cannot be set by the application (whereas OrderDate can). Normally I would simply write the OrderTotal without a public setter:

public decimal OrderTotal { get; private set; }

However if I do so BLToolkit will no longer set the value of this property. I also already tried to write this as an internal property and defining BLToolkit as a friend assembly
(InternalsVisibleTo("BLToolkit.4, PublicKey=xyz")) with no success.

How can I write a property without a public setter that can still be populated by BLToolkit?

  • 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-31T03:59:10+00:00Added an answer on May 31, 2026 at 3:59 am

    There is a Storage Property on the MapField Attribute, maybe that will help

        public class Class1
        {
            int _int32 = 0;
            [MapField(Storage = "_int32")]
            public int Int32
            {
                get { return _int32; }
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assume I have a business object like this, class Employee { public string name;
Let's assume that an application has all necessary business rules in the model /
Assume the following problem context: 1) In our application, we have a business object
Lets say I have business class: public class Foo { public int Prop1 {get;set;}
let us assume that I have a reusable business layer that further makes use
Let's assume we have the following method in the business layer. What's the best
Assume I have an enumerable object enum and now I want to get the
Assume you have a function read_key and normally it does some stuff. You someone
assume we have : class Dictionary { int n; int *ints; char **strs; inline
I am writing a standard database-backed business application. Assume that I work with bank

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.