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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:05:16+00:00 2026-05-15T19:05:16+00:00

We have ASP.NET MVC2 project with EntityFramework mappings. alt text http://www.freeimagehosting.net/uploads/552e05f607.jpg How to delete

  • 0

We have ASP.NET MVC2 project with EntityFramework mappings.alt text http://www.freeimagehosting.net/uploads/552e05f607.jpg

How to delete row from Structure table with cascade deleting rows from Customer table (Customer table has “Zero or One – Many” association with itself and cascade deleteing of children Customers)?

  • 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-15T19:05:17+00:00Added an answer on May 15, 2026 at 7:05 pm

    Cascading Deletes is something that I always stay away from. It is a cool concept to learn about, but I have not yet seen a serious implementation of Cascading Deletes.

    Having read my rant, read on..

    When you execute your delete statement, SQL Server first identifies all the rows that have to be deleted. It builds a structure of all tables that have to be included, and all the rows that will be deleted.

    Any given table cannot appear in this list more than once, and there must be a single path to a child tree from a parent tree.

    I think that you are encountering this issue because you have a self join on the Customer table.

    You are going to have to delete the child rows by hand, and then delete the parent.

    FWIW, I would not drop the foreign key relationship and try to set up triggers (like the KB article below suggests).

    http://support.microsoft.com/kb/321843

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

Sidebar

Related Questions

I have a ASP.NET MVC2 project in VS2010 that can be deployed in two
I have implemented Unity within my Asp.Net MVC2 project. I am currently registering my
I'm working on a ASP.NET MVC2 project, for which I have configured the localisation
On an ASP.NET-MVC2 project, I have built some user controls that resides in Views\Shared\EditorTemplates
I have created a new MVC2 project using the ASP.NET MVC2 Web Application, which
Currently I'm developing a ASP.NET mvc2 project. In that i have some dll files.
I have model validation in my ASP.NET MVC2 project, and I want to implement
I'm building a project with ASP.NET MVC2 and i have a problem. According to
I have a Asp.net MVC 2 project. My start page has following link: http://localhost:2666/Home/Index?SomeID=4f62c452-4513-4dd0-b235-830d721815e4
I have made custom attribute in my asp.net mvc2 project: [AttributeUsage(AttributeTargets.Property, AllowMultiple = false,

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.