Andy Beaulieu shows how to use WCF RIA Services programmatically - without relying on the DomainDataSource controls in XAML.
The DomainContext class allows the Silverlight client to access the Domain Service Class you created on the server side. A new DomainContext class is automatically generated on the client side for you when you create a new Domain Service.