public Catg CatgGet(int id) { var sql = @"select * from catg where id=@id; select * from catgprop where catgid=@id; select * from catgpropvalue where catgid=@id; "; using (BaseConn) using (var multi = BaseConn.QueryMultiple(sql, new { id }, commandTimeout: 60)) { var catg = multi.Read <Catg>().FirstOrDefault(); var props = multi.Read <Catg.Prop>().ToList(); var propValues = multi.Read <Catg.Prop.Value>().ToList(); BaseConn.Close(); if (catg != null) { foreach (var prop in props) { prop.Values = propValues.Where(x => x.PropId == prop.Id).ToList(); } } catg.Props = props; return(catg); } }
public void UpLoadFile() { var response = BaseConn.Post <TestGetRequest, SingleApiResponse>(new TestGetRequest() { UID = 1 }); Assert.True(response.IsSuccess); Assert.True(response.IsBizSuccess); }