New Posts New Posts RSS Feed: Devforce and JSON
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Devforce and JSON

 Post Reply Post Reply
Author
Vonzkie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 01-Aug-2011
Location: PH
Posts: 133
Post Options Post Options   Quote Vonzkie Quote  Post ReplyReply Direct Link To This Post Topic: Devforce and JSON
    Posted: 20-Nov-2012 at 12:56am
Hi,

How about a Code First example for OData and JSON?

I tried it but while viewing my OData in browser, it has errors.

I'm using an EntityBase as the base class of my Entities.

    [ProvideEntityAspect]
    [DataContract(IsReference = true)]
    public abstract class EntityBase : IEntity, IPropertyChangedInterceptor
    {
        public EntityAspect EntityAspect
        {
            get { return EntityAspect.Wrap(this); }
        }

        public virtual void OnPropertyChanged(PropertyChangedEventArgs e)
        {

        }
    }
}

I applied an attribute in the EntityBase but it didn't work either
[IgnoreProperties(@"EntityAspect", @"AAAA_EntityAspectForSerialization")]
and the DataServiceKey attribute per entity.

Thanks,
Von


Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post Posted: 15-Nov-2012 at 7:16pm
http://drc.ideablade.com/devforce-2012/bin/view/Documentation/odata
Back to Top
Vonzkie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 01-Aug-2011
Location: PH
Posts: 133
Post Options Post Options   Quote Vonzkie Quote  Post ReplyReply Direct Link To This Post Posted: 15-Nov-2012 at 7:08pm
Hi,

Do you have sample codes of using Devforce and returning the results as JSON to the client?

Thanks,
Von
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down