Beispiel #1
0
        public void AcceptChanges()
        {
            Predicate <T> match = new Predicate <T>(delegate(T entity) { return(entity.EntityState == EntityState.Deleted); });

            data.RemoveAll(match);
            foreach (T entity in this.GetEntitiesByEntityState(EntityState.Modified, EntityState.New))
            {
                entity.EntityState         = EntityState.UnChange;
                entity.OriginalEntityState = EntityState.UnChange;
                entity._OriginalData       = SqlMap <T> .GetEntityToDictionaryConverter()(entity);

                entity.ClearChangedFields();
            }
        }
Beispiel #2
0
 public Dictionary <string, object> ConvertEntityToDictionary(T entity)
 {
     return(SqlMap <T> .GetEntityToDictionaryConverter()(entity));
 }