.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

EF TPH Inheritance errors

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :ASP.Net

Trying my hand at TPH inheritance and having an annoying little issue. Here's the approach:

1) Start with table "Skill" with column (nvarchar) "SkillCode"

2) Add entity "BusinessSkill", set to inherit from Skill

3) Map to BusinessSkill to Skill table

4) add condition BusinessSkill of SkillCode = "business"

Here I tried to build and got error:

Error    1    Error 3032: Problem in Mapping Fragment starting at line 1429: Condition member 'Skill.SkillCode' with a condition other than 'IsNull=False' is mapped. Either remove the condition on Skill.SkillCode or remove it from the mapping.
    C:\Projects\TAP\TAP.Core\TAPModel.edmx    1430    15    TAP.Core

After reading up I found a suggestion to delete SkillCode from Skill, that resulted in this error:

Error    1    Error 3034: Problem in Mapping Fragments starting at lines 1429, 1436: Two entities with different keys are mapped to the same row. Ensure these two mapping fragments do not map two groups of entities with overlapping keys to the same group of rows.
    C:\Projects\TAP\TAP.Core\TAPModel.edmx    1430    15    TAP.Core

View Complete Post

More Related Resource Links

How can I be sure that my entire project is up-to-date and free of errors in VS2010?


Seems like a stupid question, but I will go to Build > Build Solution many many times and the build will succeed many many times, then I will put in a minor syntax error and the build will fail, BUT the build will not fail because of the minor syntax error; it will fail because of an unresolved type that I put in about twenty compiles ago. And then I will fix the minor syntax eror, and the compiler will still complain about the unresolved type. Here is my code:

<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
  <form runat="server">
  Hello World!!  

Pretty simple, really. I go to Buld > Build WebApplication1 and it runs OK. Now, if I put in a minor syntax error, such as substitute "forrrrrrrm" for "form" and then try to Build Solution, it complains not about the misspelled word, but about the FreeTextBox. And then if I correct the misspelled wird, it still complains about the FreeTextBox. Which leads me to believe that Building the Solution does not check absolutely 100% everything that needs to be checked. Is there a more thorough way of compiling a program that I need to use?

Word Automation - Multiple DCOM Errors/Behavior

Before I get started, I already know that Microsoft does not support and highly discourages server-based MS Office automation.  I've read a multitude of posts and smarmy "*wink*, here's a link" replies, so I'm looking for actual help here, not condescending reprimands.

That notwithstanding, here is my problem.  I have developed a simple method that will open a local Word document, modify some header information, and then save the document as a new file.  As expected, it works great as a console/windows app, but as soon as I went to ASP.NET, DCOM jacked my world up when accessing the app remotely from a different domain account (that has access to the ASP.NET app.  For reference, my method is shown below:


1    public static string ModifyAndSaveBuildDocument(string localFilePath, BuildDocumentType docType, string buildNumber, DateTime buildDate, string projectName)
2            {
3                try
4                {
5                    ProjectConfiguration config = (ProjectConfiguration)ConfigurationManager.GetSection("ProjectConfiguration");

Toolbox: Logging Web App Errors, Learning LINQ, and More


See how to log Web application errors for better health monitoring, what to read if you're thinking about LINQ, and which blog Scott recommends reading this month.

Scott Mitchell

MSDN Magazine April 2008

Enterprise Library: Take Exception To Critical Errors With Custom Application Blocks


Enterprise Library is a collection of application functionality blocks that you can re-use in your application for common functionality you'd otherwise have to write again and again. Here Jay Hilyard explains how to use them.

Jay Hilyard

MSDN Magazine September 2006

Toolbox: Synchronize Data, Review Runtime Errors, and More


This month we bring you products that let you synchronize data, correct runtime errors, and more.

Scott Mitchell

MSDN Magazine August 2006

Master Pages: Master Your Site Design with Visual Inheritance and Page Templates


Master pages in ASP.NET 2.0 solve a problem many Web developers have been solving on their own with a variety of techniques for years - providing a single master template for an entire site. This article covers the details of master pages, discussing their usage and implementation and how they are a natural evolution of custom techniques developers are using today.

Fritz Onion

MSDN Magazine June 2004

ASP.NET MVC3 Areas and Razor views produce errors?


The view at '~/Areas/SomeArea/Views/List/Index.cshtml' must derive from ViewPage, ViewPage, ViewUserControl, or ViewUserControl.

The project structure is pretty much default. There is one area called SomeArea. It has a single controller called List. It does nothing except:

public ActionResult Index()
    return View("~/Areas/SomeArea/Views/List/Index.cshtml");

The view looks like:

@inherits System.Web.Mvc.WebViewPage<dynamic>
    View.Title = "Index";
    LayoutPage = "~/Views/Shared/_Layout.cshtml";


I have tried emptying the entire file part by part and nothing seems to help. If I create a controller and view outside the area it works just fine. If I create an aspx view it works fine as well. Is it possible the default razor view engine doesn't support areas at this time?

The areas are registered too.

public static void RegisterRoutes(RouteCollection routes)
        "Default", // Route name
        "{controller}/{action}/{id}", // URL with parameters

Think that there is actually errors in ajax toolkit for 2.0 framework...hmm


Im using VS2008, asp.net C# 2.0.


Recently i tryed to correct some stuff on my page and i had a friend to take a look at the stuff...


What i did was that i have Examples page with code examples. Then accordion panes for each code piece...And syntaxhighlighter for each code piece. The code that i presented is read from the txt files wich makes it easyer for me to put new examples on the site...

But the problem is now that two of my accordion panes are not working...and everything works in all other browsers this just happens in Internet Explorer. This is kind of weird and my friends explaination was that there is actually errors in the ajax toolkit dll.


Im using the latest version of ajax toolkit for framework 2.0 wich is 1.0.20229.

My friend said its actually amazing that the toolkit has been out there for that long and it has not been tested that well and that there i still errors in it.


You can test this by your self by doing the exact as i explain:


go here: http://www.simpa.dk/Examples.aspx?cookieCheck=true

click Csharp

and try to open the accordion that is from the bottom 2 or 1 they dont collapse...

but this works in all other browsers then Internet Explore

Validation errors and getting the site disability accessibile


I'm using the official validator from the World Wide Web Consortium, http://validator.w3.org/

And I'm seeing a lot of validation errors. What can be done to make my sharepoint publishing site a little more accessibility friendly?


Reporting Services in SharePoint integration - configurtion errors in 64bit version



We have build an MOSS 2007 environment on 64 bit servers. We build the reporting services server and configured in SharePoint integration mode. Initially configuration looks fine with reporting services integration with green indicators.


After creating a web application and accessing the web site from the report servor, i have found the following errors:


Server Error in '/' Application.

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'RSSharePointSoapProxy, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot fi

Moss 2007 Document check out and check in errors


Users are receiving errors when trying to check in documents.


"The Web server is busy. Try again later."


"This document was checked out to your local drafts folder but the local copy could not be checked in to the site. Close any application that is editing the document and try to check in again, or discard the checkout."


"There is a problem with the Web server. Try again later, or contact the server administrator."

Workstation has office 2007, upgraded from 2003. Documents are being checked out, edited, and checked in properly. Any help appreciated. Thanks.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend