c# - Silverlight: How to consume a REST API? -


i'm building silverlight app want hosted in azure , use azure table storage.

i have class represents main data entity, expenseinfo. has many data annotations ria validation, such [required].

i following tutorial set rest service access sl. wants there class in web role data serialization. class contain same data expenseinfo.

so, want expenseinfo be? want separate classes in each project? put in 1 project, , instantiate in both? weird have class data annotations in server side web role?

thanks, i'm new sl , azure.

the pattern you're looking here data transfer object (dto) pattern. here's good article on pros , cons of pattern. personally, don't mind additional classes dto and/or , adapter pattern brings (you see adapter type patterns used on place, mvvm hot 1 right now). have strong dislike sharing business logic in assemblies across trust boundary, use dto/adapter in architectures.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -