Exemple #1
0
        void IDataRepository.Delete <TEntity>(TEntity entity)
        {
            var dbEntity = dataContext.Set <TEntity>()
                           .SingleOrDefault(e => e.Id == entity.Id);

            if (dbEntity != null)
            {
                dataContext.Remove(dbEntity);
            }
        }