Click here to Skip to main content
15,898,538 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Unable to disable backgroup using modalpopup extender Pin
dan!sh 18-Jun-09 4:21
professional dan!sh 18-Jun-09 4:21 
QuestionN-Layer ASP.Net Application Pin
Nutan T.18-Jun-09 3:46
Nutan T.18-Jun-09 3:46 
AnswerRe: N-Layer ASP.Net Application Pin
Vimalsoft(Pty) Ltd18-Jun-09 3:50
professionalVimalsoft(Pty) Ltd18-Jun-09 3:50 
QuestionValidation Summary Pin
Pankaj1818-Jun-09 3:00
Pankaj1818-Jun-09 3:00 
AnswerRe: Validation Summary Pin
Vimalsoft(Pty) Ltd18-Jun-09 3:34
professionalVimalsoft(Pty) Ltd18-Jun-09 3:34 
AnswerRe: Validation Summary Pin
Baran M18-Jun-09 20:44
Baran M18-Jun-09 20:44 
Questionpre class like CP Pin
Xmen Real 18-Jun-09 2:58
professional Xmen Real 18-Jun-09 2:58 
QuestionCustom Properties in partial class of Entities Framework object not displayed in ASP.NET Dynamic Data Pin
Kris Penner18-Jun-09 2:27
Kris Penner18-Jun-09 2:27 
Hello,

I am trying to display in a Dynamic Data app, a custom property added to the partial class of an ADO.NET Entity Framework entity class.

For example, where Person is a entity in a ADO.NET Entity Framework model, I would add:
public partial class Person
{
  public string FullName { get { return FirstName + " " + LastName; } }
}


However, with Dynamic Data, it uses the internal System.Web.DynamicData.ModelProviders.EFTableProvider for generating its columns collection which only allows properties defined in the entity model to be displayed - as in only the database columns, not custom added ones.

Does anyone know any work arounds to this, or is it possible and I am missing something obvious.
Seems silly I can't do this. LINQ to SQL with Dynamic Data can do this easy as it uses reflection in its DLinqTableProvider to find all properties in the object, not just those with mappings to database fields.


EFTableProvider's enumerator to create its columns for Dynamic Data:
foreach (EdmMember member in entityType.get_Members()) // only entity DB mapped fields are returned in the Members property

DLinqTableProvider's enumerator to create its columns for Dynamic Data:
IEnumerator<PropertyInfo> enumerator = this.GetOrderedProperties(rowType.get_Type()).GetEnumerator()
where GetOrderedProperties returns a list of properties based on reflection:
PropertyInfo[] properties = type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly);


Anyone have any thoughts on how to do this effectively?
I need the many-to-many relationship management that Entity Framework provides - otherwise I would stick with LINQ to SQL.

Thanks for any help!

Cheers,
kris
GeneralRe: Custom Properties in partial class of Entities Framework object not displayed in ASP.NET Dynamic Data Pin
Brady Kelly26-Jun-10 3:45
Brady Kelly26-Jun-10 3:45 
GeneralRe: Custom Properties in partial class of Entities Framework object not displayed in ASP.NET Dynamic Data Pin
brinkerville19-Jan-11 5:54
brinkerville19-Jan-11 5:54 
AnswerRe: Custom Properties in partial class of Entities Framework object not displayed in ASP.NET Dynamic Data Pin
Martintuk10-Jan-13 5:56
Martintuk10-Jan-13 5:56 
QuestionRating Control Pin
keyur satyadev18-Jun-09 2:11
keyur satyadev18-Jun-09 2:11 
AnswerRe: Rating Control Pin
Not Active18-Jun-09 2:21
mentorNot Active18-Jun-09 2:21 
GeneralRe: Rating Control Pin
keyur satyadev18-Jun-09 2:49
keyur satyadev18-Jun-09 2:49 
GeneralRe: Rating Control Pin
Not Active18-Jun-09 2:57
mentorNot Active18-Jun-09 2:57 
GeneralRe: Rating Control [modified] Pin
keyur satyadev18-Jun-09 3:01
keyur satyadev18-Jun-09 3:01 
AnswerRe: Rating Control Pin
Abhijit Jana18-Jun-09 3:27
professionalAbhijit Jana18-Jun-09 3:27 
GeneralRe: Rating Control Pin
keyur satyadev18-Jun-09 3:31
keyur satyadev18-Jun-09 3:31 
GeneralRe: Rating Control Pin
Not Active18-Jun-09 3:55
mentorNot Active18-Jun-09 3:55 
GeneralRe: Rating Control Pin
Xmen Real 18-Jun-09 4:31
professional Xmen Real 18-Jun-09 4:31 
GeneralRe: Rating Control Pin
Abhijit Jana18-Jun-09 4:54
professionalAbhijit Jana18-Jun-09 4:54 
QuestionCheck Session is Null Pin
yesu prakash18-Jun-09 1:59
yesu prakash18-Jun-09 1:59 
AnswerRe: Check Session is Null Pin
himanshu256118-Jun-09 2:05
himanshu256118-Jun-09 2:05 
AnswerRe: Check Session is Null Pin
CrazyCoder2618-Jun-09 2:07
CrazyCoder2618-Jun-09 2:07 
AnswerRe: Check Session is Null Pin
httplover18-Jun-09 4:15
httplover18-Jun-09 4:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.