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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:07:48+00:00 2026-05-13T07:07:48+00:00

I have a Linq-To-SQL mapping to a column in a SQL table. This column

  • 0

I have a Linq-To-SQL mapping to a column in a SQL table.

This column is type DateTime with default mapping / binding of getdate().

The problem is that Linq-To-SQL tries to insert 12/1/0001 12:00 AM instead of letting SQL do its thing and insert getdate().

Is there a way around this?

Additionally, if the column is allowed to be null, why does ‘Linq-to-SQL’ try to insert a default value?

  • 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-13T07:07:48+00:00Added an answer on May 13, 2026 at 7:07 am

    This might help (scroll up a wee little bit). It talks of setting the IsDbGenerated and AutoSync properties, which tell the data context that the value is generated at the DB and how the value in the L2SQL object should be synced with the value in the database.

    I think my google fu is low today, I’m positive I’ve read a good article/blog post about this, but I cannae find it again.

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

Sidebar

Ask A Question

Stats

  • Questions 293k
  • Answers 293k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Doing a quick search, I came across JSONPath. Haven't used… May 13, 2026 at 6:23 pm
  • Editorial Team
    Editorial Team added an answer array_filter does that. If you don’t supply a callback function,… May 13, 2026 at 6:23 pm
  • Editorial Team
    Editorial Team added an answer Have you looked at LibGD? I can't seem to find… May 13, 2026 at 6:23 pm

Related Questions

I am having a problem giving a LINQ predicate the knowledge it needs to
This question is similar to this question but not quite the same. Can I
LINQ to SQL by default maps a binary column (varbinary, image, ...) to a
I have a stored procedure that returns two int Values. The first can not
I know what i want but not sure of the name and required tools

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.