Beispiel #1
0
 /// <summary>Reloads encapsulated Entity from database</summary>
 /// <param name="container"></param>
 /// <param name="entity"></param>
 /// <remarks>ToStringWithEntityName() is replaced with entity.LogicalName</remarks>
 public static Entity Reload(this IExecutionContainer container, Entity entity) =>
 container.Reload(entity, new ColumnSet());
Beispiel #2
0
 /// <summary>Reloads encapsulated Entity from database</summary>
 /// <param name="container"></param>
 /// <param name="entity"></param>
 /// <param name="columns">Set of colums with which entity should be reloaded</param>
 /// <remarks>ToStringWithEntityName() is replaced with entity.LogicalName</remarks>
 public static Entity Reload(this IExecutionContainer container, Entity entity, params string[] columns) =>
 container.Reload(entity, new ColumnSet(columns));
Beispiel #3
0
 /// <summary>
 /// Checks if a property exists in the encapsulated Entity
 /// </summary>
 /// <param name="container"></param>
 /// <param name="entity"></param>
 /// <param name="attribute">Name of property to check</param>
 /// <returns></returns>
 public static Entity Ensure(this IExecutionContainer container, Entity entity, string attribute) =>
 entity.Contains(attribute)
     ? entity
     : container.Reload(entity, attribute);