public async Task <Guid> InsertAsync(MinerEntity minerEntity)
        {
            try
            {
                MinerDbEntity miner = new MinerDbEntity();
                using var context = this.iDatabaseFactory.GetDbContext();
                ////Determine the next ID
                var newID = Guid.NewGuid();
                miner.Id       = newID;
                miner.Name     = minerEntity.Name;
                miner.Quantity = minerEntity.Quantity;
                miner.Handicap = minerEntity.Handicap;
                miner.IsLogged = minerEntity.IsLogged;

                context.Miners.Add(miner);
                var isInserted = await context.SaveContextChangesAsync() > 0;

                if (isInserted)
                {
                    var result = miner.Id;
                    return(result);
                }
                throw new Exception("Miner Not Inserted");
            }
            catch (Exception)
            {
                throw;
            }
        }
 public MinerEntity Convert(MinerDbEntity miner)
 {
     return(new MinerEntity()
     {
         Id = miner.Id,
         Handicap = miner.Handicap,
         Name = miner.Name,
         Quantity = miner.Quantity,
         IsLogged = miner.IsLogged
     });
 }