gennaio 2011 Blog Posts

WCF RIA Services and TotalEntitiesCount=-1

If you do serious WCF RIA Services development you’ll probably end up with something like this: using System.Linq;using System.ServiceModel.DomainServices.Hosting;using System.ServiceModel.DomainServices.Server;[EnableClientAccess()]public class NorthwindService : DomainService{ private readonly NorthwindEntities datacontext = new NorthwindEntities(); [Query] public IQueryable<Customers> GetCustomers() { return this.datacontext.Customers; }} where code that interacts with data store is separated in a separate NortwindEntities class (maybe just because we use NHybernate as favorite ORM…). Everything works as expected...

posted @ lunedì 31 gennaio 2011 08:47 | Feedback (0)

Paging and Sorting using WCF RIA Services SP1

Paging and sorting are, de-facto, standard required implementations in any line of business (LOB) application and we, as Silverlight developers, all know how “boring” (I won’t categorize the feature as ‘complicated’) is the implementation, in special case if we’re dealing with a WCF Service and request its introduced after service design is completed. Wouldn’t it be good to finally forget about paging and sorting and use a common reusable implementation? well’ you’ll be happy to know that thank to new classes added to RIA Service SP1 this is finally possible. Let’s introduce the triad of classes used...

posted @ venerdì 28 gennaio 2011 10:01 | Feedback (2)

Azure and CommunicationObjectFaultedException

If you’re experiencing problems when launching your application on Azure emulator (slow start, role not responding…) or finally a weird message like following one: you’ve just hit a common Azure issue: your web.config is not writable (maybe just because checked-in by your favorite source-control system) Just make it writable and enjoy your Azure debugging session. Technorati Tags: Azure

posted @ mercoledì 19 gennaio 2011 23:17 | Feedback (0)

How to inspect Azure package contents

Sometimes you need to inspect what’s inside an Azure package content (.cspkg file) before it gets published to the cloud because you need to be sure that some required assemblies are in maybe simply because you need to figure why your app doesn’t work when running from the cloud. A common case is when you use WCF RIA Services and you forget to include both System.ServiceModel.DomainServices.Hosting and System.ServiceModel.DomainServices.Server inside development package by marking both with CopyLocal=true (any data access related libraries must be included too BTW…) The trick to allow package inspection is to add...

posted @ domenica 9 gennaio 2011 12:02 | Feedback (0)