예제 #1
0
        public async Task <Person> GetById(int id)
        {
            var req = _conn.CreateCommand();

            req.CommandText = $"SELECT * FROM person WHERE id={id};";
            await _conn.OpenAsync();

            var res = await req.ExecuteReaderAsync();

            var p = FromDb(res);

            _conn.Close();

            return(p.First());
        }