Beispiel #1
0
 /// <summary>
 /// Updates the entity with the values contained within the surrogate.
 /// </summary>
 /// <param name="entity">The entity.</param>
 public void BindObjectInstance(Status entity)
 {
     if (entity.Row.RowState == DataRowState.Added)
     {
     entity.Name = Name;
     }
     else
     {
     if (_nameHasBeenUpdated)
     {
         entity.Name = Name;
     }
     }
 }
Beispiel #2
0
 /// <summary>Constructor for assembling a surrogate from an entity object.</summary>
 /// <param name="entity">The Entity Object.</param>
 public StatusSurrogate(Status entity)
     : base(entity)
 {
     _sb = new StringBuilder();
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StatusSurrogateBase"/> class.
 /// </summary>
 /// <param name="entity">The entity.</param>
 public StatusSurrogateBase(Status entity)
 {
     StatusID = entity.StatusID;
     Name = entity.Name;
 }