예제 #1
0
 public void insertIntoRegistrationTableIfNotExist(string emailId, string password, string name)
 {
     try
     {
         RegistrationTable registrationRecord = new RegistrationTable(emailId.ToLower(), password, name);
         Trace.WriteLine("Saving record....");
         context.Save(registrationRecord);
     }
     catch (AmazonDynamoDBException e) { Console.WriteLine(e.Message); }
 }
예제 #2
0
        public bool loginIntoApplication(string emailId, string password)
        {
            Trace.WriteLine("Retriving record....");
            RegistrationTable registrationRecordRetrived = context.Load <RegistrationTable>(emailId);

            if (registrationRecordRetrived != null &&
                registrationRecordRetrived.EmailId.ToLower().Equals(emailId) &&
                registrationRecordRetrived.Password.Equals(password))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }