public TokenDto StartSession(int id) { var session = new Session() { Start = DateTime.Now, Expires = DateTime.Now.AddMinutes(30), UserId = id }; uow.Sessions.Add(session); uow.SaveChanges(); return new TokenDto() { Token = encryptionService.EncryptString(session.Id.ToString()) }; }
public void UpdateSession(Session session) { throw new NotImplementedException(); }