Ejemplo n.º 1
0
        public static void Attach <T>(this ICollection <T> iCollection, IEnumerable <T> entities) where T : class
        {
            EntityCollection <T> entityCollection = iCollection as EntityCollection <T>;

            if (entityCollection == null || entities == null)
            {
                throw new ArgumentNullException();
            }
            entityCollection.Attach(entities);
        }
Ejemplo n.º 2
0
        public static ObjectQuery <T> Attach <T>(this ICollection <T> iCollection) where T : class
        {
            EntityCollection <T> entityCollection = iCollection as EntityCollection <T>;

            if (entityCollection == null)
            {
                throw new ArgumentNullException();
            }
            return(entityCollection.Attach());
        }