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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:24:22+00:00 2026-06-04T21:24:22+00:00

I am using the ADO.NET Mocking Context Generator to generate my entity classes from

  • 0

I am using the ADO.NET Mocking Context Generator to generate my entity classes from an EDMX file, so that I can use them in unit tests. However, after I generate my entities and try to build the project, I get the following error:

The type name 'DateTime' does not exist in the type 'MyProject.Models.System'

Within the code, DateTime properties are declared in the format:

public virtual System.DateTime LastActive

If I change System.DateTime to just DateTime, the error clears. Unfortunately this is not practical, as there quite a lot of them, besides they will be overwritten next time I regenerate.

Why am i receiving this error, and how can I prevent it?

  • 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-06-04T21:24:23+00:00Added an answer on June 4, 2026 at 9:24 pm

    It looks like the problem is that you’ve got a type called System. That’s a really bad idea – it’s going to cause this problem all over the place. (See Eric Lippert’s blog posts on this topic for more details…)

    The most specific way of declaring this would be:

    public virtual global::System.DateTime LastActive { get; set; }
    

    If you could change the generator to create that, it should be okay… but personally I’d just change the System type to be called something else if you possibly can.

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

Sidebar

Related Questions

I am using ADO.NET Mocking Context Generator plugin for my Entity Framework model. I
I have Entity Data Model using ADO.NET Entity Data Model (using auto generate from
I heard that SQL Injection can still be possible when using ADO.NET SQLParameter (paramterised
I'm using ADO.NET Unit Testable Repository Generator ( described here ) to generate the
I have a asp.net application in that I am using ado.net entity framework in
Using: ado.net How can I select data from a DataTable using SQL with an
I have some existing code that retrieves data from a database using ADO.NET that
How can I do a select count(*) using ADO.NET Entity Framework? Thanks!
how can I by using Ado.net rename existing column in a table and changing
I am using ADO.NET (.NET 1.1) in a legacy app. I know that DataAdapter.Fill()

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.