public static IToOneResourceLinkageBuilder <TToResource> ToOne <TFromResource, TToResource>(this IIncludedResourcesBuilder includedResourcesBuilder, params IToOneResourceLinkage <TFromResource, TToResource>[] toOneResourceLinkageCollection) where TFromResource : class, IResource where TToResource : class, IResource { Contract.Requires(includedResourcesBuilder != null); return(includedResourcesBuilder.ToOne(toOneResourceLinkageCollection)); }
// PUBLIC METHODS /////////////////////////////////////////////////// #region Extension Methods public static IToOneResourceLinkageBuilder <TToResource> ToOne <TFromResource, TToResource>(this IIncludedResourcesBuilder includedResourcesBuilder, TFromResource fromResource, string fromRel, TToResource toResource) where TFromResource : class, IResource where TToResource : class, IResource { Contract.Requires(includedResourcesBuilder != null); Contract.Requires(fromResource != null); Contract.Requires(String.IsNullOrWhiteSpace(fromRel)); var toOneResourceLinkage = new ToOneResourceLinkage <TFromResource, TToResource>(fromResource, fromRel, toResource); return(includedResourcesBuilder.ToOne(toOneResourceLinkage)); }