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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:12:03+00:00 2026-05-27T22:12:03+00:00

We have to deal with production and test connection strings in our environment. Database

  • 0

We have to deal with production and test connection strings in our environment. Database First Solution.

I have an extremely picky client that is not happy with the fact that you can create a partial class with a second constructor with a parameter, or inherit from the named Entities class with an empty parameter constructor.

He claims that a developer could unknowingly use the base constructor.

Is there any way to modify the generated constructor, or set an option so that the base constructor does not get generated, so we can write our own?

Thanks!

  • 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-27T22:12:03+00:00Added an answer on May 27, 2026 at 10:12 pm

    If you are using T4 template for context generation you can do whatever you want. For example:

    • Make your context sealed
    • Remove partial keywork from generated context class
    • Define constructor you want directly in the template

    The only thing you need to do is modify the ModelName.Context.tt template.

    Anyway your client should concentrate on business requirements and not on stupid assumption about coding.

    He claims that a developer could unknowingly use the base constructor.

    I claim that this can happen but it is not an issue if your application is correctly tested and if you make code review for new team members or junior developers.

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

Sidebar

Related Questions

I often have to deal with XML documents that contain namespaced elements, but doesn't
I am looking for a better solution than what we currently have to deal
I've got a rails 3 production app that uses devise to deal with authentication.
I have to deal with queries that have lots of results, but I only
We have an ASP.NET website in production that generates a report and sends it
Have you used Cucumber in a production environment? What problems did you find using
We are using SQL 2008 Transactional replication to replicate data from our production database
I have to deal with an API which need to be provided a DataSource
I have a deal with a 3rd party web page. And If I click
I do have to deal with very large plain text files (over 10 gigabytes,

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.