getting closer to models
This commit is contained in:
@ -1,13 +1,35 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Sequence.Entities;
|
||||
|
||||
namespace Sequence.Services;
|
||||
|
||||
public interface ICardService
|
||||
{
|
||||
Task<Match> CreateMatchAsync(Guid userIdOne, Guid userIdTwo);
|
||||
ICollection<Card> GetCards();
|
||||
}
|
||||
|
||||
public interface IUserService
|
||||
public class EntityCardService : ICardService
|
||||
{
|
||||
Task<User> CreateUserAsync(string username, string password);
|
||||
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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user