Example #1
0
        //[TestMethod]
        public void MigrateUserFromMssqlUserToMysqlUser()
        {
            RetrieveUserClass retrieveUser      = new RetrieveUserClass(DbContextConstant.MsSqlDbContext);
            IList <UserTable> allCurrentMsUsers = retrieveUser.GetAllEntities().Take(10).ToList();

            Console.WriteLine("msuser count: " + allCurrentMsUsers.Count);

            UserPersistant userPersistant = new UserPersistant(allCurrentMsUsers, DbContextConstant.MySqlDbContext);

            userPersistant.SaveChange();
        }
Example #2
0
 public List <UserTable> GetAllUsers()
 {
     try
     {
         RetrieveUserClass retrieveUser = new RetrieveUserClass(DatabaseOptionConfigRetriever.DatabaseOptionAppSetting);
         IList <UserTable> user         = retrieveUser.GetAllEntities();
         return(user.ToList());
     }
     catch (Exception exception)
     {
         var error = new EntityErrorContract
         {
             Message = exception.Message
         };
         throw new FaultException <EntityErrorContract>(error);
     }
 }