Ejemplo n.º 1
0
        public void CreateInstanceTest()
        {
            DatabaseGateway objDatabaseGateway = new DatabaseGateway("Utility.DatabaseHelper.SQLiteHelper");
            var             items = objDatabaseGateway.ExecuteNonQuery("select * from TB_ITEMS");

            Assert.IsNotNull(items);
        }
Ejemplo n.º 2
0
        public int Register(UserEntity entity)
        {
            _objDBGateway = new DatabaseGateway(_dbType);
            int result = 0;

            try
            {
                string query = "insert into TB_Login(USERNAME,PASSWORD) values('" + entity.UserName + "','" + entity.Password + "')";

                result = _objDBGateway.ExecuteNonQuery(query);
            }
            catch (Exception ex)
            {
                throw;
            }
            return(result);
        }