Пример #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);
        }