2023-04-05 02:47:05 +00:00
|
|
|
using Microsoft.AspNetCore.Identity;
|
2023-04-05 01:58:24 +00:00
|
|
|
using Sequence.Entities;
|
|
|
|
|
|
|
|
namespace Sequence.Services;
|
|
|
|
|
|
|
|
public interface ICardService
|
|
|
|
{
|
2023-04-05 02:47:05 +00:00
|
|
|
Task<Match> CreateMatchAsync(Guid userIdOne, Guid userIdTwo);
|
2023-04-05 01:58:24 +00:00
|
|
|
ICollection<Card> GetCards();
|
|
|
|
}
|
|
|
|
|
2023-04-05 02:47:05 +00:00
|
|
|
public class EntityCardService : ICardService
|
2023-04-05 01:58:24 +00:00
|
|
|
{
|
2023-04-05 02:47:05 +00:00
|
|
|
private readonly DbContext context;
|
|
|
|
|
|
|
|
public EntityCardService(DbContext context)
|
|
|
|
{
|
|
|
|
this.context = context;
|
|
|
|
}
|
|
|
|
|
|
|
|
public async Task<Match> CreateMatchAsync(Guid userIdOne, Guid userIdTwo)
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
|
|
var userOne = await context.FindAsync<User>(userIdOne);
|
|
|
|
var userTwo = await context.FindAsync<User>(userIdTwo);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public ICollection<Card> GetCards()
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
2023-04-05 01:58:24 +00:00
|
|
|
}
|