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

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

Collections for inherited entities...

Posted By:      Posted Date: September 05, 2010    Points: 0   Category :ASP.Net
So I'm coding up a simple blogging/content application in MVC2. In my EF domain model I have an abstract entity named "Resource" which serves as a base class for any content that can be published. I have entities named "Picture", "BlogEntry" and "Event" which all inherit from "Resource". My problem is, it seems it doesn't make collections for Pictures, BlogEntries and Events. I only have a collection of Resources. How can I get collections of the inherited classes? Is it something I'll have to create myself? If so, how? 

View Complete Post

More Related Resource Links

ASP.NET 4.0 Dynamic Data and Many to Many Entity Framework Entities

I did not play much with Dynamic Data controls in VS2008 and just made a cool discovery in VS2010 Beta 2. This may not even be new, but as I'm sitting 30,000+ feet over the Atlantic ocean, I don't have access to VS2008 at the moment to check.

CLR Inside Out: Collections Best Practices


This month Inbar Gazit shows readers how to get the most out of the System.Collections namespace.

Inbar Gazit

MSDN Magazine August 2007

Data Binding: Give Your Everyday Custom Collections a Design-Time Makeover


In this article, Paul Ballard shows how you can provide data binding support for your custom collections to enable sorting, searching, and editing in as simple a manner as possible. In addition, he shows how to make all of these features available in the Windows and Web Forms Designers, just like an ADO.NET DataSet.

Paul Ballard

MSDN Magazine August 2005

Cutting Edge: DataSets vs. Collections


In software, five years is like a geological era. Five years ago, the Microsoft® . NET Framework had just been announced. Since then, the DataSet has emerged as the key object for performing a variety of data-related tasks in .

Dino Esposito

MSDN Magazine August 2005

Cutting Edge: Collections and Data Binding


When it's time to design the Data Access Layer (DAL) of your distributed Microsoft® . NET Framework-based app, one of the key decisions you'll make is how you'll pass data to and from methods of DAL classes.

Dino Esposito

MSDN Magazine May 2005

Multiprocessor Optimizations: Fine-Tuning Concurrent Access to Large Data Collections


Application performance involves more than just speed. In a Web server environment, top performance also means ensuring that the maximum numbers of users can be served concurrently. This can be accomplished through efficient use of multiprocessor machines and thread management. This article presents techniques that can solve a number of concurrency problems. One approach, using thread management, controls access to a database on a per-thread basis, which protects the integrity of the data. In the article, reusable thread classes are built and presented. The classes are then tested and their performance in a live environment is examined.

Ian Emmons

MSDN Magazine August 2001

Dynamic Data Entities Modal GridViewPager not showing


I am using the ModalEF template, converted to a web application.

The GridViewPager is not showing up, though everything else works fine (filters, updates, etc).

I have tried several things in the last two weeks, to no avail.

Any assistance would be greatly appreciated.

The GridViewPager.ascx.cs Page_Load fires, but the Page_PreRender does not.




<%@ Page Title="" Language="C#" MasterPageFile="~/DefaultMaster.master" AutoEventWireup="True" CodeBehind="ListDetailsModal.aspx.cs" Inherits="DATTWeb.DynamicData.PageTemplates.ListDetailsModal" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolKit" %>
<%@ Register Assembly="System.Web.Entity, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Web.UI.WebControls" tagprefix="asp" %>

<%@ Register src="~/DynamicData/Content/GridViewPager.ascx" tagname="GridViewPager" tagprefix="asp" %>
<%@ Register src="~/DynamicData/Content/FilterUserControl.ascx" tagname="DynamicFilter" tagprefix="asp" %>

<asp:Content ID="Content2&quo

How to create a single entry page for site collections in MOSS 2007



I have  7 site collections containing a few hundred team collaboration sites. Some users are internal (intranet) but most are external (extranet). Extranet users are experiencing problems with losing links to their sites and forgetting which URLs to use. So I would like to create a single entry page that all users can enter after the logon process, which shows a list of sites they have permission to access, and other user-specific information. Perhaps relevant documents, tasks, recently modified documents etc.

I know this sounds like a 'My Site' but we want to use use a general welcome page instead. We use Windows authentication.
What is the best way of doing this and is it something that can be done in SharePoing Designer or does it need to be done in Visual Studio?

Many thanks in advance.

Video: SharePoint 2010: Sites as Collections of Pages

Find out how pages in SharePoint 2010 play a key role in the structure of a site. The developer (and the user) now has complete control of the user interface including the placement of Web parts anywhere on the page. (Length: 15:53)

Video: SharePoint 2010 Web Applications, Site Collections, and Sites

This demonstration shows how to work with Web Applications, Site Collections and Sites programmatically. (Length: 4:02)

Entities Framework 4 Questions


1. Do you have to setup cascading on the SQL server also, or if you setup Cascading in EF 4 that will do it for you, and you can keep Cascading in SQL not setup?

2. Is there any problems I should be aware of like the problems(yet manual fixble) with  using Cascading in EF 4 , MVC 2, SQL 2005.


Thanks :)



XML Entities

Writer Daniel Abrahamian describes the formation of XML entities within the context of programmatic function. It is important to understand that an entity itself refers to the physical rather than logical structure of an XML Document. Entities are useful when applied to short documents, as depicted in Scalable Vector Graphics (SVG). The usefulness of entities in this application lies in its ability to define a specific style. For example, if you had an entity called DenyAndProhibit, you could declare it like this:<!ENTITY DenyAndProhibit  "fill:deny;stroke:prohibit">It is then possible to reuse the entity in attribute values throughout the document itself. Even the most basic XML documents utilize at least one entity. It is important to recall that each XML document displays at least one pyysical entity, which is the document entity itself.

Serializing Linq to Entities for use in a REST Service

What would be the best approach to send data retrieved from Linq to Entities over a rest service? For example, if you have a Linq to Entities class, say Products from the Northwind database. I want to return a subset of the Products (based on a query on the model) back through a service. First a retrieve a List<Product> from the context, and then i need to serialize the data and send it over the wire. If I use the exact Linq to Entities class, then there is so much "garbage" that it either fails outright (from a circular reference) or you are wasting bandwith. What is a design to overcome this? Create POCO objects for each linq to entities class you want to send and create custom code to tranform each object in the list to the POCO object? This is the only way I can see doing it, although it would be very tedius to create and maintain (unless some custom code generation was created). Is there a better approach? clients

Is it a good practice to use DataContract attributes on business entities

Hi Folks, Currently I am developing a framwork for travel industry and finally my framework will expose its operations in the form of WCF Service. I was wondering if it is a good idea to decorate your entities and class with DataContract attributes. I know this is required if you want your classes/fields to be serialized/deseralized.  However, by Adding these attributes mean you are making your entities service specific which I believe not a good idea. Service and domain specific entities should be seperate. One solution to this would be to make DTOs and decorate them with these attributes and this make sense as core purpose of these DTOs is serialization and deserialization. What can be other options....? Please share your thoughts. Thanks, Naeem

Global Navigation across Site Collections

MOSS 2007 Global Navigation across Site Collections I have couple of questions. a) Is there an easy way to share a global navigation between site collections? b) Portal has the navigation tabs (tab1..n). User doesn't have access to all the tabs, may have access to one or more tabs. Each tab represents a site collection. Is there a way to display the only tabs to which the users have access? If we can develop using SDK, please provide some hints.   Thanks,

How to deploy dashboards made in dashboard designer to diferent site collections?

Hi I just migrated from sharepoint 2007 to 2010. We used to have performance point dashboards spread across libraries in subsites all across our primary site collection "Http://server:x" after I migrated I understand that I must migrate all performance point content to a new site or site collection made with the business intellingence template. I created a new site collection with this template (Http://server:x/sites/pps) and succesfully migrated all performance point content. Now I want to redeploy all the dashboards to their respective subsites in the  "Http://server:x" site collection so that everything looks exactly as it did when we where using SharePoint 2007. But when I try to deploy to a site I only get the option to deploy it to the ("Http://server:x/sites/pps") site collection and its respective libraries. I wish to manage all dashboard content centralized in (Http://server:x/sites/pps) but I want to deploy dashboards to libraries across  "Http://server:x" is this posible or how is Performance Point services supossed to work?   I also having trouble with DashBoard designer. I have everthing running on a Virtual Machine test enviroment. With windows server 2008 r2, 4 gb ram. Everything installed in one machine. And Suddently DashBoard Designer Crashes In the event log I get the error Dashboa
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