/// <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; } } }
/// <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(); }
/// <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; }