예제 #1
0
        public async Task <IEnumerable <Address> > GetAll()
        {
            var sqlQuery = "select * from Address";

            using var connection = new SqlConnection(_sql.GetConnectionString());
            var addresses = await connection.QueryAsync <Address>(sqlQuery);

            return(addresses);
        }
예제 #2
0
        public async Task <IEnumerable <Detail> > GetAll()
        {
            var sqlQuery = "select * from Details";

            using var connection = new SqlConnection(_sql.GetConnectionString());
            var details = await connection.QueryAsync <Detail>(sqlQuery);

            return(details);
        }
예제 #3
0
        public async Task <IEnumerable <Property> > GetAll()
        {
            var sqlQuery = "select * from Properties";

            using var connection = new SqlConnection(_sql.GetConnectionString());
            var properties = await connection.QueryAsync <Property>(sqlQuery);

            return(properties);
        }