public TDomain Create(TDomain domain)
        {
            var entity = ToPersistence(domain);

            entity = Context.Set <TEntity>().Add(entity);

            Context.SaveChanges();

            return(ToDomain(entity));
        }
        public void SaveChanges()
        {
            try
            {
                var changes = _context.SaveChanges();
                Log.Debug($"{changes} changes persisted.");
            }

            catch (DbEntityValidationException dve)
            {
                dve.GetErrorLogResult(null);
                throw;
            }
        }