public void Delete(Guid entityId)
 {
     using (var unitOfWork = new UnitOfWork.UnitOfWorkScope <ConnectionDbContext>(UnitOfWork.UnitOfWorkScopePurpose.Writing))
     {
         unitOfWork.DbContext.Set <T>().Remove(GetById(entityId));
         unitOfWork.SaveChanges();
     }
 }
 public Guid Add(T entity)
 {
     using (var unitOfWork = new UnitOfWork.UnitOfWorkScope <ConnectionDbContext>(UnitOfWork.UnitOfWorkScopePurpose.Writing))
     {
         unitOfWork.DbContext.Set <T>().Add(entity);
         unitOfWork.SaveChanges();
         return(entity.Id);
     }
 }