This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello - I am curious as to what I get by using the new EntityServiceBase class. Do I still need to use the PerCall ServiceBehavior attribute on my services when I inherit from EntityServiceBase? How about inheriting from IDisposable, should I be doing that as well? It seems this construct eliminated the need for several "best practices" lined out for the LS3 product, and it would be A Good Thing to kind of lay out the basic requirements and options (best practices, if you will) for using this new approach. Can anyone help me out here? Also, I haven't heard back from Jeremy on a different thread for over a week -- is he on vacation or just taking a break from answering support questions?
Thanks, Dave |
|
|
Hi Dave, EntityServiceBase gives you primarily two things. Firstly it gives you the UnitOfWork property which is stored against the OperationContext so you get a "Per Operation" scope and dont need to handle instantiating or disposing of the UOW manually. Secondly it sets up our suggested default of PerCall behavior. The main purpose of the class is to help provide a quick start with our suggested defaults for building a custom entity service. The class doesnt implement IDisposable, so you would only need to do so if you have other resources to dispose. On the other thread, sorry didnt realise you needed any more feedback :( - We have taken the suggestions onboard and as mentioned we will be looking to get these in to the product in the near future, for now you will just need to handle the code changes manually via the templates as suggested or alternatively you could look at supressing the generation of the properties (by selecting FieldOnly as the generation method for your entity properties in the designer) and then moving those property definitions to a partial where you can selectively control the [DataMember] attributes according to requirements.
Jeremy |
|