Home » .NET | Featured | RIA | Headline | WCF RIA Services

WCF RIA Services Contrib: new extension methods

6. December 2011 by Kevin Dockx 6 Comments

WCF RIA Services Contrib is an open-source CodePlex project, maintained by Colin Blair, which consists of a collection of community contributions that can be used with WCF RIA Services.  At the moment, it consists of ComboBoxExtensions, a Data Validation Framework, Entity Tools, Entity Graph, Fluent Metadata API & T4RIA – you can find more info on those here.

 

Recently, I contributed a bunch of extension methods to the Entity Tools component.  These are methods I tend to use in projects, so I figured: why not release them to the community? :)

 

An overview:

 

  • public static IEnumerable YieldChildEntities(this Entity parent, EntityChangeSet changeSet,
    bool includeDirectChildrenOfEntityBaseType = false)
  • public static IEnumerable YieldChildEntities(this Entity parent, EntityContainer container,
    bool includeDirectChildrenOfEntityBaseType = false)
  • public static void DeleteChildEntities(this Entity parent, EntityContainer container,
    bool includeDirectChildrenOfEntityBaseType = false)
  • public static void DetachChildEntities(this Entity parent, EntityContainer container,
    bool includeDirectChildrenOfEntityBaseType = false)
  • public static void RejectChangesOnChildEntities(this Entity parent, EntityContainer container,
    bool includeDirectChildrenOfEntityBaseType = false)
  • public static void RejectChangesOnChildEntities(this Entity parent, EntityChangeSet changeSet,
    bool includeDirectChildrenOfEntityBaseType = false)
  • public static void AttachRange<T>(this EntitySet<T> entitySet, IEnumerable<T> entitiesToAttach) where T : Entity
  • public static IEnumerable<T> GetEntitiesOfType<T>(this EntityChangeSet changeSet, bool includeAddedEntites = true, bool includeModifiedEntities = true, bool includeDeletedEntities = false) where T : Entity
  • public static bool HasValidationErrors(this System.ServiceModel.DomainServices.Client.SubmitOperation submitOperation)
  • public static bool HasValidationErrors<T>(this System.ServiceModel.DomainServices.Client.SubmitOperation submitOperation) where T:Entity
  • public static IEnumerable<ValidationResult> GetAllValidationErrors(this System.ServiceModel.DomainServices.Client.SubmitOperation submitOperation)
  • public static IEnumerable<ValidationResult> GetAllValidationErrors<T>(this System.ServiceModel.DomainServices.Client.SubmitOperation submitOperation) where T:Entity

 

At the moment, the only way to access these is by downloading the source code, but in the (near) future, they will be included in the NuGet package for Entity Tools, so you might want to keep an eye on that. 

 

Enjoy! :)

 

 

Comments (6) -

 

christmas gifts said:

hello sir i really like your blog many knowledgeable information in this blog and every articles in this blog really very nice thanks for share it.

 

yiyad123 said:

Very glad to meet you here in the post

 

discount north face jackets said:

Always good, when you can not only be told, but! I'm sure your pleasure, to write this article.

 

buy gold bars said:

Good stuff. Thank you so so much for sharing your knowledge with world through the Internet. Wonderful blog and post you got here

 

chaussures guess said:

Quelque part autour de l'été entre ma 5ème et6ths années de grade à l'EV Cain école primaire une

 

chaussures puma pas cher said:

En fait, à cette taille,il ressemblait à une épée courte de plus qu'un couteau. La longueur de la lame est compensé

Comments are closed