testapi
This commit is contained in:
1 parent
2db9525570
commit
5aca82244e
21 files changed
+545
-126
No files matched your search
@@ -113,5 +113,23 @@ namespace uWine.Core.Infrastructure.Repository
|
||||
}
|
||||
return new Owner();
|
||||
}
|
||||
|
||||
public List<Owner> FromUser(int userId)
|
||||
{
|
||||
var list = new List<Owner>();
|
||||
using (var connection = Connection()) {
|
||||
connection.Open();
|
||||
var cmd = new MySqlCommand("SELECT owner_id as id FROM t_user_owner WHERE user_id = @userId",connection);
|
||||
cmd.Parameters.AddWithValue("userId", userId);
|
||||
using (var reader = cmd.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
list.Add(Simple(reader.GetInt32("id")));
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user