* Added LoginService to handle login and user creation * Extended DbContext * Extended Mapper
26 lines
597 B
C#
26 lines
597 B
C#
using AutoMapper;
|
|
using SytelineSaAppEfDataModel.Entities;
|
|
|
|
namespace SytelineSaAppEfDataModel.Services;
|
|
|
|
public class LoginService(SytelineSaAppDbContext context, IMapper mapper) : ILoginService
|
|
{
|
|
public async EdiUserd CreateUser(string userName, string password)
|
|
{
|
|
EdiUser user = new EdiUser()
|
|
{
|
|
Login = userName,
|
|
Password = password,
|
|
};
|
|
|
|
context.EdiUsers.Add(user);
|
|
await context.SaveChangesAsync();
|
|
|
|
return
|
|
}
|
|
|
|
public bool Login(string userName, string password)
|
|
{
|
|
|
|
}
|
|
} |