You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.0 KiB
36 lines
1.0 KiB
using API.Context;
|
|
using API.Controllers;
|
|
using DbServices;
|
|
using Services;
|
|
|
|
namespace APIConsole
|
|
{
|
|
public class UsersControllerConsole
|
|
{
|
|
private UsersController _controller;
|
|
|
|
public UsersControllerConsole()
|
|
{
|
|
AppContext.AppContext context = new AppContext.AppContext();
|
|
IUserService users = new DbUserService(context);
|
|
ITeamService teams = new DbTeamService(context);
|
|
ITacticService tactics = new DbTacticService(context);
|
|
IContextAccessor accessor = new HttpContextAccessor();
|
|
|
|
_controller = new UsersController(users, teams, tactics, accessor);
|
|
}
|
|
|
|
public async void GetUserTest()
|
|
{
|
|
var result = await _controller.GetUser();
|
|
Console.WriteLine($"GetUser Result: {result}");
|
|
}
|
|
|
|
public async void GetUserDataTest()
|
|
{
|
|
var result = await _controller.GetUserData();
|
|
Console.WriteLine($"GetUserData Result: {result}");
|
|
}
|
|
|
|
}
|
|
} |