LLBL version V3.1
VS 2010
I create a silverlight application which enable WCF RIA service
the serivce code like
[EnableClientAccess()]
public class RIAService1 : LLBLGenProDomainService2
{
public IEnumerable<NotepadEntity> GetEntityList()
{
DataAccessAdapter adapter = new DataAccessAdapter();
EntityCollection<NotepadEntity> collection = new EntityCollection<NotepadEntity>();
adapter.FetchEntityCollection(collection, null);
return collection;
}
protected override IDataAccessAdapter CreateDataAccessAdapter()
{
return new DataAccessAdapter();
}
}
In silverlight client,the generated code in file XXX.g.cs like
public sealed partial class RIAService1 : DomainContext
{
// some other code
/// <summary>
/// Gets the set of <see cref="NotepadEntity"/> entity instances that have been loaded into this <see cref="RIAService1"/> instance.
/// </summary>
public EntitySet<NotepadEntity> NotepadEntities
{
get
{
return base.EntityContainer.GetEntitySet<NotepadEntity>();
}
}
public EntityQuery<NotepadEntity> GetEntityListQuery()
{
this.ValidateMethod("GetEntityListQuery", null);
return base.CreateQuery<NotepadEntity>("GetEntityList", null, false, true);
}
}
when I call the GetEntityListQuery() method,it's Query property is null, and no breakpoint be hitted. It seems that no service code be executed.
RIAService1 service = new RIAService1();
var result = service.GetEntityListQuery().Query;
dataGrid1.ItemsSource = result;
How to call the service method,do me miss something?