// Inserts First info For The Certificate
 public void InsertToSigntureTable(string ClientId, string Hash, string Username)
 {
     using (caProjectEntities context = new caProjectEntities())
     {
         DateTime  dt        = DateTime.Now;
         signature signature = new signature()
         {
             hash      = Hash,
             uuid      = ClientId,
             username  = Username,
             timestamp = BitConverter.GetBytes(dt.Ticks),
             ldtdisk   = "N"
         };
         context.signatures.Add(signature);
         context.SaveChanges();
     }
 }
        //checking if there is allready Request for the hostname
        public bool CheckIfMachineExists(string hostid, string hase)
        {
            try
            {
                using (caProjectEntities context = new caProjectEntities())
                {
                    signature machine = context.signatures.FirstOrDefault(r => r.uuid == hostid);
                    if (machine != null && machine.hash == hase)
                    {
                        return(true);
                    }
                    return(false);
                }
            }

            catch (Exception ex)
            {
                Console.Write(ex.Message);
                return(false);
            }
        }