Helo!
I need to write a RIA service to call Java webservices from Silverlight 3.0 app. I'm testing how stuff works and in my Web app I have a MyData class which has 2 properties (int ID, string Text):
namespace SilverlightApplication1.Web
{
public class MyData
{
[Key]
public int ID { get; set; }
public string Text { get; set; }
}
}
Then I wrote simple DomainService:
[EnableClientAccess()]
public class MyService : DomainService
{
public IQueryable<MyData> GetMyData(string Url)
{
// here I will call my WebService
List<MyData> result = new List<MyData>();
result.Add(new MyData { ID = 1, Text = Url });
return result.AsQueryable();
}
}
}
How can I get data into my SL app? Now I have this:
namespace SilverlightApplication1 { public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); MyContext context = new MyContext(); } } }
I called and load but nothink worsk (exceptions, or nulls)...
I had Invoke annotation but MyData is not TEntity and I can't use Strings or other simple types as well... :/ I'm reading and reading posts and nothing works like it should..
Any help would be really appreciated.
Thank you!