New Posts New Posts RSS Feed: Generated Code causing Errors
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Generated Code causing Errors

 Post Reply Post Reply
Author
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 Topic: Generated Code causing Errors
    Posted: 18-Jan-2011 at 5:29pm
jipock;

Thanks for sharing your solution.
Back to Top
jipock View Drop Down
Newbie
Newbie
Avatar

Joined: 08-Dec-2010
Location: Cherry Hill, NJ
Posts: 39
Post Options Post Options   Quote jipock Quote  Post ReplyReply Direct Link To This Post Posted: 16-Jan-2011 at 6:16pm
Sorry it took so long to get back.
 
The issue here is that ServiceKeyword is an EF object. I don't ever explicitly define it.
 
More Wierdness:
* Other Co-workers do NOT have this problem at all, even pulling the same code from TFS.
* When I delete my working folder and do a fresh pull (basically making my code identical to my co-workers) I experience the same problems (that my co-workers do not).
 
My Solution:
Take my web service and put it in a completely new Project. When DevForce is in the same project as the Web Site and my Web Service is in a different service, this is no longer an issue.
 
 
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: 13-Jan-2011 at 10:55am
Hi jipock;

My guess is that the same class, ServiceKeyword, is defined in the Service Reference (for the web service). Try checking the generated Reference.cs file.
Back to Top
jipock View Drop Down
Newbie
Newbie
Avatar

Joined: 08-Dec-2010
Location: Cherry Hill, NJ
Posts: 39
Post Options Post Options   Quote jipock Quote  Post ReplyReply Direct Link To This Post Posted: 13-Jan-2011 at 6:51am
here's an example of "myobject":
 

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

[DataContract(IsReference=true)]

[KnownType(typeof(Service))]

[IbEm.DataSourceKeyName(@"AccessNavigationEDMEntities")]

[IbEm.DefaultEntitySetName(@"AccessNavigationEDMEntities.ServiceKeywords")]

public partial class ServiceKeyword : IbEm.Entity {}

This is all generated by DevForce, I didn't write this part. There is a partial class to it, but it doesn't have anything which should cause problems.

public partial class ServiceKeyword

{

public static ServiceKeyword Create(EntityManager manager)

{

ServiceKeyword entity = manager.CreateEntity<ServiceKeyword>();

entity.CreatedBy = manager.Principal.Identity.Name;

entity.CreatedDateTime = DateTime.Now;

entity.Keyword = String.Empty;

entity.ServiceId = 0;

entity.ServiceKeywordId = 0;

entity.LastModifiedBy = manager.Principal.Identity.Name;

entity.LastModifiedDateTime = DateTime.Now;

entity.EntityAspect.AddToManager();

return entity;

}

}

Is there anything I can do to troubleshoot further?
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: 12-Jan-2011 at 5:58pm
Hi jipock;

It sounds like myobject is derived from EntityModel.EntityWrapper and is using the same variable name PropertyChanged. Either change the PropertyChanged variable name or use the new keyword as the warning says. Please see Microsoft website below for more details.

Back to Top
jipock View Drop Down
Newbie
Newbie
Avatar

Joined: 08-Dec-2010
Location: Cherry Hill, NJ
Posts: 39
Post Options Post Options   Quote jipock Quote  Post ReplyReply Direct Link To This Post Posted: 11-Jan-2011 at 7:34am
Quick note: the compile-time warnings are just that: warnings. But, when I run the application, I get errors with the LoginReply object and can't proceed.
Back to Top
jipock View Drop Down
Newbie
Newbie
Avatar

Joined: 08-Dec-2010
Location: Cherry Hill, NJ
Posts: 39
Post Options Post Options   Quote jipock Quote  Post ReplyReply Direct Link To This Post Posted: 11-Jan-2011 at 7:32am
Morning, all.
 
I am experiencing an issue when I'm running Ideablade / DevForce for Silverlight. Specifically, I"m getting a compile-time warnings similar to this:  "mynamespace.mywebservice.myobject.PropertyChanged' hides inherited member 'IdeaBlade.EntityModel.EntityWrapper.PropertyChanged'. Use the new keyword if hiding was intended."
 
Background of this: I have an application I'm converting over to DevForce for Silverlight. The previous code uses ADO.NET stored proc calls from a webservice. Now, I'm using Entity Framework, being hosted in the same web project. I still need to make WebService calls from the Silverlight project.
 
Fairly recently (within last couple of weeks), when I update the webservice reference in my Silverlight project, it appears that the myobject class's event is hiding the EntityWrapper Property changed event. To my knowledge, I've not done anything crazy in the webservice. This process *was* working fine.
 
Anyone have ideas on either a) what's causing this? b) how to troubleshoot better?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down