[]
Converts an System.Data.Entity.Core.Objects.DataClasses.EntityCollection<> to an editable live view.
public static View<T> AsLive<T>(this EntityCollection<T> entities) where T : class, IEntityWithRelationships
| Type | Name | Description |
|---|---|---|
| EntityCollection<T> | entities | The entity collection to convert. |
| Type | Description |
|---|---|
| View<T> | The resulting live view. |
| Name | Description |
|---|---|
| T | The type of the entities in the |
Converts a POCO System.Data.Entity.Core.Objects.DataClasses.EntityCollection<> to an editable live view.
public static View<T> AsLive<T>(this ICollection<T> pocoCollection, EntityClientScope scope) where T : class
| Type | Name | Description |
|---|---|---|
| ICollection<T> | pocoCollection | The entity collection to convert. It must be of type System.Data.Entity.Core.Objects.DataClasses.EntityCollection<>. |
| EntityClientScope | scope | The EntityClientScope to which the entity owning this collection belongs (in which it was fetched by a query or created). |
| Type | Description |
|---|---|
| View<T> | The resulting live view. |
| Name | Description |
|---|---|
| T | The type of the entities in the |
When POCO objects are used (with proxies), navigation collection properties are typed as ICollection<T>, not System.Data.Entity.Core.Objects.DataClasses.EntityCollection<> (although they are System.Data.Entity.Core.Objects.DataClasses.EntityCollection<> at run time). That is why a special AsLive extension method must be used.
| Type | Condition |
|---|---|
| ArgumentException | The |