New Posts New Posts RSS Feed: 'EntityState' property not available?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

'EntityState' property not available?

 Post Reply Post Reply
Author
TonyHansen View Drop Down
Newbie
Newbie


Joined: 18-May-2012
Location: Adelaide
Posts: 7
Post Options Post Options   Quote TonyHansen Quote  Post ReplyReply Direct Link To This Post Topic: 'EntityState' property not available?
    Posted: 19-May-2012 at 12:58am
Hmmm ... I think I'll really be demonstrating my newbie cred now ...
 
Trying to perform a simple entity deletion, as outlined here:
 
 
Only one minor problem ... none of my entities appear to have an "EntityAspect" property I can change!
 
I get my entity from the backend store like this:
 

var contactType = manager.Gen_ContactType

.Where(c => c.ContactTypeId == 7)

.FirstOrNullEntity();

The contactType entity that is returned has all the properties I expect ... but no "EntityAspect" property.
 
Interestingly, when I bound a grid to the object class in my domain model, the grid is actually showing an "EntityAspect" property.
 
So ... what am I doing wrong?
 
I will point out that I used the "Code Second" method of generation, and opted to include the OData option during creation.  As a result, my class header looks like this:
 

/// <summary>The auto-generated Gen_ContactType class. </summary>

[IbAop.ProvideEntityAspect]

[DataContract(IsReference = true)]

[Table("Gen_ContactType", Schema = "dbo")]

[IgnoreProperties(@"EntityAspect")]

[DataServiceKey(@"ContactTypeId")]

public partial class Gen_ContactType

{

All of the samples I've seen appear to pre-date the incorporation of PostSharp, and none seem to have the "EntityAspect" in the "IgnoreProperties".
 
I've tried removing the "IgnoreProperties" attribute ... but that doesn't appear to make any difference.
 
Any suggestions?
 
T
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 21-May-2012 at 12:26pm
Back to Top
TonyHansen View Drop Down
Newbie
Newbie


Joined: 18-May-2012
Location: Adelaide
Posts: 7
Post Options Post Options   Quote TonyHansen Quote  Post ReplyReply Direct Link To This Post Posted: 21-May-2012 at 7:36pm
Ah yes, that's perfect.
 
Maybe I need to go right back to basics, and RTFM! :-D
 
Thanks for the quick reply!

T
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down