Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Lightswitch with my own Domain objects

I'm working on an asp.net application. I have a Domain assembly (containing mostly command and queries code), a Domain.Contract assembly ( containing mostly the domain objets), a Repository (called by the Domain) and the Web site.

For some specific backoffice needs, I want to create a Lightswitch application. I want to use my current domain as a datasource. I added a WCF Ria Service class Library, and in the RiaService.Web project, added a class based on DomainService, with one query method. Nothing more (no entities, since they are in my Domain.Contract assembly)

When in Lightswitch, I add the RiaService.Web assembly as a DataSource, in the Select Data Source Objects, it tells me : "The selected WCF RIA Service does not contain any entity definitions. Once the service is modified, you will need to refresh the data source."

And now, I'm stuck : in every sample I can find, the entities are in the RiaService.Web assembly, but i don't want to recreate the objects I already made.

Thanks :

like image 327
Guillaume Avatar asked Jun 25 '26 20:06

Guillaume


1 Answers

You must have at least one method that does not take parameters that returns the collection type. You don't have to use it, but you have to have it.

like image 127
Michael Washington Avatar answered Jun 27 '26 09:06

Michael Washington



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!