Index: src/Clients/Angular/finki-chattery/src/app/core/services/auth.service.ts
===================================================================
--- src/Clients/Angular/finki-chattery/src/app/core/services/auth.service.ts	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/Clients/Angular/finki-chattery/src/app/core/services/auth.service.ts	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -24,4 +24,5 @@
   public user: ApplicationUser | null = null;
   public oidcUser: User | null = null;
+  public selfUser: SelfUserResponse | null = null;
 
   constructor(private baseApi: BaseApiService) {
@@ -35,4 +36,10 @@
         user?.profile.isVerified
       );
+
+      this.selfUserDto().subscribe((selfUser) => {
+        if (selfUser) {
+          this.selfUser = selfUser;
+        }
+      });
     });
   }
@@ -86,4 +93,12 @@
         user.profile.isVerified
       );
+
+      if (!this.selfUser) {
+        this.selfUserDto().subscribe((selfUser) => {
+          if (selfUser) {
+            this.selfUser = selfUser;
+          }
+        });
+      }
     });
   }
Index: src/Clients/Angular/finki-chattery/src/app/core/state/question-facade.service.ts
===================================================================
--- src/Clients/Angular/finki-chattery/src/app/core/state/question-facade.service.ts	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/Clients/Angular/finki-chattery/src/app/core/state/question-facade.service.ts	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -3,5 +3,5 @@
 import { Action, Store } from '@ngrx/store';
 import { Observable, Subject } from 'rxjs';
-import { filter } from 'rxjs/operators';
+import { filter, map } from 'rxjs/operators';
 
 import {
@@ -12,4 +12,5 @@
   VoteType
 } from 'src/app/shared-app/models';
+import { AuthService } from '../services';
 import {
   EffectStartedWorking,
@@ -18,4 +19,5 @@
   GetQuestionState,
   GetSearchQuestions,
+  SetCorrectAnswer,
   VoteAnswer
 } from './question-state/question.actions';
@@ -31,6 +33,10 @@
   effectWorking$: Observable<boolean | HttpErrorResponse>;
 
-  constructor(private store: Store<QuestionState>) {
+  constructor(private store: Store<QuestionState>, private auth: AuthService) {
     this.effectWorking$ = this.store.select(questionStateQuery.effectWorking).pipe(filter((effect) => effect !== null));
+  }
+
+  public currentQuestionOwnedByCurrentUser(): Observable<boolean> {
+    return this.getQuestion().pipe(map((question) => this.auth.selfUser?.student?.uid === question.student.uid));
   }
 
@@ -71,4 +77,8 @@
   }
 
+  public setCorrectAnswer(questionUid: string, answerUid: string): void {
+    this.dispatchEffect(new SetCorrectAnswer(questionUid, answerUid));
+  }
+
   public voteAnswer(answerUid: string, questionUid: string, voteType: VoteType): void {
     this.dispatchEffect(new VoteAnswer(questionUid, answerUid, voteType));
Index: src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.actions.ts
===================================================================
--- src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.actions.ts	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.actions.ts	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -13,4 +13,6 @@
   GetQuestionState = '[Question] Get state',
   GetQuestionStateSuccess = '[Question] Get state success',
+  SetCorrectAnswer = '[Question] Set Correct Answer',
+  SetCorrectAnswerSuccess = '[Question] Set Correct Answer success',
   GetPreviewQuestionsLatest = '[Question] Get preview questions Latest',
   GetPreviewQuestionsLatestSuccess = '[Question] Get preview questions Latest Success',
@@ -36,4 +38,16 @@
 
   constructor(public payload: QuestionStateViewModel) {}
+}
+
+export class SetCorrectAnswer implements Action {
+  readonly type = QuestionActionTypes.SetCorrectAnswer;
+
+  constructor(public questionUid: string, public answerUid: string) {}
+}
+
+export class SetCorrectAnswerSuccess implements Action {
+  readonly type = QuestionActionTypes.SetCorrectAnswerSuccess;
+
+  constructor(public payload: string) {}
 }
 
@@ -110,4 +124,5 @@
   | GetSearchQuestionsSuccess
   | VoteAnswerSuccess
+  | SetCorrectAnswerSuccess
   | EffectStartedWorking
   | EffectFinishedWorking
Index: src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.effects.ts
===================================================================
--- src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.effects.ts	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.effects.ts	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -1,9 +1,10 @@
 import { Injectable } from '@angular/core';
 import { act, Actions, createEffect, ofType } from '@ngrx/effects';
-import { catchError, filter, mergeMap, switchMap, withLatestFrom } from 'rxjs/operators';
+import { catchError, filter, mergeMap, switchMap, tap, withLatestFrom } from 'rxjs/operators';
 import { PreviewQuestionsOrderEnum, SearchQuestionsQueryViewModel } from 'src/app/shared-app/models';
 import { TranslateFromJsonService } from 'src/app/shared-app/services';
 
 import { BaseApiService } from 'src/app/shared-app/services/base-api.service';
+import { NotificationService } from '../../services/notification.service';
 import { QuestionFacadeService } from '../question-facade.service';
 import { VoteAnswerRequest } from './question-state-request.models';
@@ -21,4 +22,6 @@
   GetSearchQuestionsSuccess,
   QuestionActionTypes,
+  SetCorrectAnswer,
+  SetCorrectAnswerSuccess,
   VoteAnswer,
   VoteAnswerSuccess
@@ -34,5 +37,6 @@
     private api: BaseApiService,
     private translate: TranslateFromJsonService,
-    private facade: QuestionFacadeService
+    private facade: QuestionFacadeService,
+    private notification: NotificationService
   ) {}
 
@@ -113,4 +117,5 @@
         const body = new VoteAnswerRequest(action.voteType);
         return this.api.post<VoteAnswerResponse>(`v1/questions/${action.questionUid}/answers/${action.answerUid}/votes`, body).pipe(
+          tap((state) => this.notification.successNotification('sucess-vote')),
           switchMap((state) => [new VoteAnswerSuccess(QuestionMapper.ToVoteAnswerViewModel(state)), new EffectFinishedWorking()]),
           catchError((err) => [new EffectFinishedWorkingError(err)])
@@ -119,3 +124,16 @@
     );
   });
+
+  setCorrectAnswer$ = createEffect(() => {
+    return this.actions$.pipe(
+      ofType<SetCorrectAnswer>(QuestionActionTypes.SetCorrectAnswer),
+      mergeMap((action) => {
+        return this.api.put<string>(`v1/questions/${action.questionUid}/answers/${action.answerUid}/correct`).pipe(
+          tap((state) => this.notification.successNotification('success-correct-answer')),
+          switchMap((state) => [new SetCorrectAnswerSuccess(state), new EffectFinishedWorking()]),
+          catchError((err) => [new EffectFinishedWorkingError(err)])
+        );
+      })
+    );
+  });
 }
Index: src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.reducers.ts
===================================================================
--- src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.reducers.ts	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.reducers.ts	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -1,3 +1,3 @@
-import { VoteType } from 'src/app/shared-app/models';
+import { AnswerQuestionStateViewModel, VoteType } from 'src/app/shared-app/models';
 import { QuestionAction, QuestionActionTypes } from './question.actions';
 import { initialState, QuestionState } from './question.state';
@@ -61,4 +61,33 @@
       };
     }
+    case QuestionActionTypes.SetCorrectAnswerSuccess: {
+      if (state.question) {
+        return {
+          ...state,
+          question: {
+            ...state.question,
+            answers: state.question.answers.map((x) => {
+              if (x.correctAnswer) {
+                return {
+                  ...x,
+                  correctAnswer: false
+                };
+              }
+              if (x.uid === action.payload) {
+                return {
+                  ...x,
+                  correctAnswer: true
+                };
+              }
+              return x;
+            })
+          }
+        };
+      }
+
+      return {
+        ...state
+      };
+    }
     case QuestionActionTypes.EffectStartedWorking: {
       return {
Index: src/Clients/Angular/finki-chattery/src/app/shared-app/components/generic/vote/vote.component.html
===================================================================
--- src/Clients/Angular/finki-chattery/src/app/shared-app/components/generic/vote/vote.component.html	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/Clients/Angular/finki-chattery/src/app/shared-app/components/generic/vote/vote.component.html	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -1,3 +1,3 @@
-<div>
+<div class="main-div">
   <div class="vote-icons" fxLayout="column" fxLayoutAlign="center center">
     <mat-icon class="vote-icon" (click)="voted(VoteType.Upvote)" [inline]="true">arrow_drop_up</mat-icon>
@@ -7,4 +7,11 @@
       >check</mat-icon
     >
+    <mat-icon
+      *ngIf="canSetCorrectAnswer && !correct"
+      [inline]="true"
+      class="text-center text-bold green set-correct-answer"
+      (click)="setCorrectAnswer.emit()"
+      >check</mat-icon
+    >
   </div>
 </div>
Index: src/Clients/Angular/finki-chattery/src/app/shared-app/components/generic/vote/vote.component.scss
===================================================================
--- src/Clients/Angular/finki-chattery/src/app/shared-app/components/generic/vote/vote.component.scss	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/Clients/Angular/finki-chattery/src/app/shared-app/components/generic/vote/vote.component.scss	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -14,2 +14,19 @@
   cursor: pointer;
 }
+
+.show-on-hover {
+  display: none;
+}
+
+.set-correct-answer {
+  opacity: 0.3;
+  visibility: hidden;
+}
+
+.main-div:hover > .vote-icons > .set-correct-answer {
+  visibility: visible;
+}
+
+.main-div {
+  height: 100%;
+}
Index: src/Clients/Angular/finki-chattery/src/app/shared-app/components/generic/vote/vote.component.ts
===================================================================
--- src/Clients/Angular/finki-chattery/src/app/shared-app/components/generic/vote/vote.component.ts	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/Clients/Angular/finki-chattery/src/app/shared-app/components/generic/vote/vote.component.ts	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -10,6 +10,8 @@
 export class VoteComponent implements OnInit {
   @Input() voteCount: number | undefined;
+  @Input() canSetCorrectAnswer: boolean | null = false;
   @Input() correct = false;
   @Output() voteClicked = new EventEmitter<VoteType>();
+  @Output() setCorrectAnswer = new EventEmitter<void>();
 
   VoteType = VoteType;
Index: src/Clients/Angular/finki-chattery/src/app/shared-app/components/question/question-preview/question-preview.component.html
===================================================================
--- src/Clients/Angular/finki-chattery/src/app/shared-app/components/question/question-preview/question-preview.component.html	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/Clients/Angular/finki-chattery/src/app/shared-app/components/question/question-preview/question-preview.component.html	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -15,7 +15,9 @@
         <div fxLayout="row wrap" fxLayoutAlign="space-around none">
           <app-vote
+            [canSetCorrectAnswer]="canSetCorrectAnswer | async"
             [voteCount]="answer.votesCount"
             [correct]="answer.correctAnswer"
             (voteClicked)="answerVoted($event, answer.uid, question.uid)"
+            (setCorrectAnswer)="setCorrectAnswer(question.uid, answer.uid)"
             fxFlex="6%"
           ></app-vote>
Index: src/Clients/Angular/finki-chattery/src/app/shared-app/components/question/question-preview/question-preview.component.ts
===================================================================
--- src/Clients/Angular/finki-chattery/src/app/shared-app/components/question/question-preview/question-preview.component.ts	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/Clients/Angular/finki-chattery/src/app/shared-app/components/question/question-preview/question-preview.component.ts	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -13,4 +13,5 @@
 })
 export class QuestionPreviewComponent implements OnInit {
+  canSetCorrectAnswer = this.questionFacade.currentQuestionOwnedByCurrentUser();
   question!: QuestionStateViewModel;
   working = true;
@@ -34,3 +35,7 @@
     this.questionFacade.voteAnswer(answerUid, questionUid, voteType);
   }
+
+  setCorrectAnswer(questionUid: string, answerUid: string): void {
+    this.questionFacade.setCorrectAnswer(questionUid, answerUid);
+  }
 }
Index: src/Clients/Angular/finki-chattery/src/app/shared-app/models/user.models.ts
===================================================================
--- src/Clients/Angular/finki-chattery/src/app/shared-app/models/user.models.ts	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/Clients/Angular/finki-chattery/src/app/shared-app/models/user.models.ts	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -9,8 +9,4 @@
 }
 
-export class SelfUserResponse {
-  uid!: string;
-}
-
 export enum ApplicationUserType {
   Student = 'Student',
@@ -19,2 +15,44 @@
   Guest = 'Guest'
 }
+
+export class SelfUserResponse {
+  public student?: StudentSelfResponse | null;
+  public teacher?: TeacherSelfResponse | null;
+  public moderator?: ModeratorSelfResponse | null;
+}
+
+export class StudentSelfResponse {
+  public uid!: string;
+  public applicationUserId!: number;
+  public index!: string;
+  public reputation!: number;
+  public imageUrl!: string;
+  public questions!: StudentQuestionResponse[];
+  public teams!: StudentTeamResponse[];
+}
+
+export class StudentQuestionResponse {
+  public questionUid!: string;
+  public title!: string;
+}
+
+export class StudentTeamResponse {
+  public teamUid!: string;
+  public name!: string;
+}
+
+export class ModeratorSelfResponse {
+  public uid!: string;
+  public applicationUserId!: number;
+}
+
+export class TeacherSelfResponse {
+  public uid!: string;
+  public applicationUserId!: number;
+  public teams!: TeacherTeamResponse[];
+}
+
+export class TeacherTeamResponse {
+  public teamUid!: string;
+  public name!: string;
+}
Index: src/Clients/Angular/finki-chattery/src/app/shared-app/services/base-api.service.ts
===================================================================
--- src/Clients/Angular/finki-chattery/src/app/shared-app/services/base-api.service.ts	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/Clients/Angular/finki-chattery/src/app/shared-app/services/base-api.service.ts	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -19,5 +19,5 @@
 
   public getSelfUser(): Observable<SelfUserResponse> {
-    return this.get<SelfUserResponse>('self');
+    return this.get<SelfUserResponse>('v1/self');
   }
 
Index: src/Clients/Angular/finki-chattery/src/assets/translations/en.json
===================================================================
--- src/Clients/Angular/finki-chattery/src/assets/translations/en.json	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/Clients/Angular/finki-chattery/src/assets/translations/en.json	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -53,4 +53,6 @@
   "ask-question-stepper-ask": "Ask question",
   "ask-question-ask-button-back": "Edit question",
+  "sucess-vote": "Successfully voted answer",
+  "success-correct-answer": "Successfully set correct answer",
   "ask-question-ask-button": "Ask question",
   "AnswerAlreadyUpvoted": "You have already upvoted this answer",
Index: src/FinkiChattery/FinkiChattery.Api/ApplicationServices/Questioning/EventHandlers/RemoveOtherCorrectAnswersAppartFromTheNewOneAndUpdateStudentReputationsEventHandler.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Api/ApplicationServices/Questioning/EventHandlers/RemoveOtherCorrectAnswersAppartFromTheNewOneAndUpdateStudentReputationsEventHandler.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Api/ApplicationServices/Questioning/EventHandlers/RemoveOtherCorrectAnswersAppartFromTheNewOneAndUpdateStudentReputationsEventHandler.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,43 @@
+﻿using FinkiChattery.Commands.Questioning;
+using FinkiChattery.Common.Mediator.Contracs;
+using FinkiChattery.Persistence.UnitOfWork;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace FinkiChattery.Api.ApplicationServices.Questioning.EventHandlers
+{
+    public class RemoveOtherCorrectAnswersAppartFromTheNewOneAndUpdateStudentReputationsEventHandler : IEventHandler<AnswerMarkedAsCorrectEvent>
+    {
+        public RemoveOtherCorrectAnswersAppartFromTheNewOneAndUpdateStudentReputationsEventHandler(IUnitOfWork unitOfWork)
+        {
+            UnitOfWork = unitOfWork;
+        }
+
+        public IUnitOfWork UnitOfWork { get; }
+
+        public async Task Handle(AnswerMarkedAsCorrectEvent notification, CancellationToken cancellationToken)
+        {
+            var questionWithAnswers = await UnitOfWork.Questions.GetQuestionWithAnswersAndStudents(notification.QuestionUid);
+
+            if (questionWithAnswers == null)
+            {
+                return;
+            }
+
+            foreach (var answer in questionWithAnswers.Answers)
+            {
+                if (answer.CorrectAnswer && answer.Uid != notification.AnswerUid)
+                {
+                    answer.CorrectAnswer = false;
+                    answer.Student.Reputation = answer.Student.Reputation - 5;
+                }
+                if (answer.Uid == notification.AnswerUid)
+                {
+                    answer.Student.Reputation = answer.Student.Reputation + 5;
+                }
+            }
+
+            await UnitOfWork.SaveAsync();
+        }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Api/ApplicationServices/User/Mapper/SelfUserMapper.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Api/ApplicationServices/User/Mapper/SelfUserMapper.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Api/ApplicationServices/User/Mapper/SelfUserMapper.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,41 @@
+﻿using FinkiChattery.Contracts.User;
+using FinkiChattery.Queries.User;
+using System.Linq;
+
+namespace FinkiChattery.Api.ApplicationServices.User
+{
+    public static class SelfUserMapper
+    {
+        public static SelfUserResponse ToSelfUserResponse(this SelfUserDto dto)
+        {
+            if (dto.StudentSelf != null)
+            {
+                var student = new StudentSelfResponse(dto.StudentSelf.Uid,
+                                                      dto.StudentSelf.ApplicationUserId,
+                                                      dto.StudentSelf.Index,
+                                                      dto.StudentSelf.Reputation,
+                                                      dto.StudentSelf.ImageUrl,
+                                                      dto.StudentSelf.Questions.Select(x => new StudentQuestionResponse(x.QuestionUid, x.Title)),
+                                                      dto.StudentSelf.Teams.Select(x => new StudentTeamResponse(x.TeamUid, x.Name)));
+
+                return new SelfUserResponse(student);
+            }
+
+            if (dto.TeacherSelf != null)
+            {
+                var teacher = new TeacherSelfResponse(dto.TeacherSelf.Uid, dto.TeacherSelf.ApplicationUserId, dto.TeacherSelf.Teams.Select(x => new TeacherTeamResponse(x.TeamUid, x.Name)));
+
+                return new SelfUserResponse(null, teacher);
+            }
+
+            if (dto.ModeratorSelf != null)
+            {
+                var moderator = new ModeratorSelfResponse(dto.ModeratorSelf.Uid, dto.ModeratorSelf.ApplicationUserId);
+
+                return new SelfUserResponse(null, null, moderator);
+            }
+
+            return new SelfUserResponse();
+        }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Api/Controllers/v1/AnswersController.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Api/Controllers/v1/AnswersController.cs	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/FinkiChattery/FinkiChattery.Api/Controllers/v1/AnswersController.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -30,4 +30,12 @@
             return Ok(answerUid);
         }
+
+        [HttpPut("{answerUid:Guid}/correct")]
+        [Authorize(AuthenticationSchemes = IdentityServerAuthenticationDefaults.AuthenticationScheme, Policy = AuthenticationPolicy.Student)]
+        public async Task<IActionResult> MarkAnswerCorrect([FromRoute] Guid questionUid, [FromRoute] Guid answerUid)
+        {
+            await MediatorService.SendAsync(new MarkAnswerCorrectCommand(questionUid, answerUid));
+            return Ok(answerUid);
+        }
     }
 }
Index: src/FinkiChattery/FinkiChattery.Api/Controllers/v1/SelfController.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Api/Controllers/v1/SelfController.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Api/Controllers/v1/SelfController.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,30 @@
+﻿using FinkiChattery.Api.ApplicationServices.User;
+using FinkiChattery.Common.Mediator.Interfaces;
+using FinkiChattery.Queries.User;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using System.Threading.Tasks;
+
+namespace FinkiChattery.Api.Controllers.v1
+{
+    [ApiVersion(ApiVersions.ApiVersion1)]
+    [Route("api/v{version:apiVersion}/[controller]/")]
+    [ApiController]
+    public class SelfController : ControllerBase
+    {
+        public SelfController(IMediatorService mediatorService)
+        {
+            MediatorService = mediatorService;
+        }
+
+        public IMediatorService MediatorService { get; }
+
+        [HttpGet]
+        [Authorize]
+        public async Task<IActionResult> Getself()
+        {
+            var selfUserDto = await MediatorService.SendQueryAsync(new GetSelfUserQuery());
+            return Ok(selfUserDto.ToSelfUserResponse());
+        }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Commands/Questioning/MarkAnswerCorrect/AnswerMarkedAsCorrectEvent.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Commands/Questioning/MarkAnswerCorrect/AnswerMarkedAsCorrectEvent.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Commands/Questioning/MarkAnswerCorrect/AnswerMarkedAsCorrectEvent.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,17 @@
+﻿using FinkiChattery.Common.Mediator.Contracs;
+using System;
+
+namespace FinkiChattery.Commands.Questioning
+{
+    public class AnswerMarkedAsCorrectEvent : IEvent
+    {
+        public AnswerMarkedAsCorrectEvent(Guid questionUid, Guid answerUid)
+        {
+            QuestionUid = questionUid;
+            AnswerUid = answerUid;
+        }
+
+        public Guid QuestionUid { get; }
+        public Guid AnswerUid { get; }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Commands/Questioning/MarkAnswerCorrect/MarkAnswerCorrectCommand.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Commands/Questioning/MarkAnswerCorrect/MarkAnswerCorrectCommand.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Commands/Questioning/MarkAnswerCorrect/MarkAnswerCorrectCommand.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,45 @@
+﻿using FinkiChattery.Common.Mediator.Contracs;
+using FinkiChattery.Common.Mediator.Interfaces;
+using FinkiChattery.Persistence.UnitOfWork;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace FinkiChattery.Commands.Questioning
+{
+    public class MarkAnswerCorrectCommand : ICommand<Guid>
+    {
+        public MarkAnswerCorrectCommand(Guid questionUid, Guid answerUid)
+        {
+            QuestionUid = questionUid;
+            AnswerUid = answerUid;
+        }
+
+        public Guid QuestionUid { get; }
+        public Guid AnswerUid { get; }
+    }
+
+    public class MarkAnswerCorrectHandler : ICommandHandler<MarkAnswerCorrectCommand, Guid>
+    {
+        public MarkAnswerCorrectHandler(IUnitOfWork unitOfWork, IEventService eventService)
+        {
+            UnitOfWork = unitOfWork;
+            EventService = eventService;
+        }
+
+        public IUnitOfWork UnitOfWork { get; }
+        public IEventService EventService { get; }
+
+        public async Task<Guid> Handle(MarkAnswerCorrectCommand request, CancellationToken cancellationToken)
+        {
+            var answer = await UnitOfWork.Answers.GetByUidAsync(request.AnswerUid);
+            answer.CorrectAnswer = true;
+
+            await UnitOfWork.SaveAsync();
+
+            EventService.Enqueue(new AnswerMarkedAsCorrectEvent(request.QuestionUid, request.AnswerUid));
+
+            return answer.Uid;
+        }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Commands/Questioning/MarkAnswerCorrect/MarkAnswerCorrectValidator.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Commands/Questioning/MarkAnswerCorrect/MarkAnswerCorrectValidator.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Commands/Questioning/MarkAnswerCorrect/MarkAnswerCorrectValidator.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,20 @@
+﻿using FinkiChattery.Commands.Questioning.Validators;
+using FinkiChattery.Commands.Questioning.Validators.Contracts;
+using FinkiChattery.Common.User;
+using FinkiChattery.Persistence.UnitOfWork;
+using FluentValidation;
+
+namespace FinkiChattery.Commands.Questioning
+{
+    public class MarkAnswerCorrectValidator : AbstractValidator<MarkAnswerCorrectCommand>
+    {
+        public MarkAnswerCorrectValidator(IUnitOfWork unitOfWork, ICurrentUser currentUser)
+        {
+            CascadeMode = CascadeMode.Stop;
+
+            RuleFor(x => x.QuestionUid).SetValidator(new StudentIsOwnerOfQuestion(unitOfWork, currentUser));
+            RuleFor(x => new AnswerInQuestionWithUidExistsDto(x.QuestionUid, x.AnswerUid)).SetValidator(new AnswerInQuestionWithUidExists(unitOfWork));
+            RuleFor(x => x.AnswerUid).SetValidator(new AnswerIsNotAlreadyMarkedAsCorrect(unitOfWork));
+        }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Commands/Questioning/QuestioningErrorCodes.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Commands/Questioning/QuestioningErrorCodes.cs	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/FinkiChattery/FinkiChattery.Commands/Questioning/QuestioningErrorCodes.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -13,5 +13,8 @@
         public const string StudentHasBadReputation = "StudentHasBadReputation"; 
         public const string AnswerTextLengthInvalid = "AnswerTextLengthInvalid";
-        public const string QuestionNotFound = "QuestionNotFound"; 
+        public const string QuestionNotFound = "QuestionNotFound";
+        public const string AnswerInQuestionNotFound = "AnswerInQuestionNotFound"; 
+        public const string StudentDoesNotOwnQuestion = "StudentDoesNotOwnQuestion";
+        public const string AnswerIsAlreadyMarkedAsCorrect = "AnswerIsAlreadyMarkedAsCorrect";
     }
 }
Index: src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/AnswerInQuestionWithUidExists.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/AnswerInQuestionWithUidExists.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/AnswerInQuestionWithUidExists.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,30 @@
+﻿using FinkiChattery.Commands.Questioning.Validators.Contracts;
+using FinkiChattery.Persistence.UnitOfWork;
+using FluentValidation.Validators;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace FinkiChattery.Commands.Questioning.Validators
+{
+    public class AnswerInQuestionWithUidExists : AsyncValidatorBase
+    {
+        public AnswerInQuestionWithUidExists(IUnitOfWork unitOfWork)
+        {
+            UnitOfWork = unitOfWork;
+        }
+
+        public IUnitOfWork UnitOfWork { get; }
+
+        protected override async Task<bool> IsValidAsync(PropertyValidatorContext context, CancellationToken cancellation)
+        {
+            var dto = (AnswerInQuestionWithUidExistsDto)context.PropertyValue;
+
+            return await UnitOfWork.Answers.AnswerInQuestionExists(dto.QuestionUid, dto.AnswerUid);
+        }
+
+        protected override string GetDefaultMessageTemplate()
+        {
+            return QuestioningErrorCodes.AnswerInQuestionNotFound;
+        }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/AnswerIsNotAlreadyMarkedAsCorrect.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/AnswerIsNotAlreadyMarkedAsCorrect.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/AnswerIsNotAlreadyMarkedAsCorrect.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,32 @@
+﻿using FinkiChattery.Persistence.UnitOfWork;
+using FluentValidation.Validators;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace FinkiChattery.Commands.Questioning.Validators
+{
+    public class AnswerIsNotAlreadyMarkedAsCorrect : AsyncValidatorBase
+    {
+        public AnswerIsNotAlreadyMarkedAsCorrect(IUnitOfWork unitOfWork)
+        {
+            UnitOfWork = unitOfWork;
+        }
+
+        public IUnitOfWork UnitOfWork { get; }
+
+        protected override async Task<bool> IsValidAsync(PropertyValidatorContext context, CancellationToken cancellation)
+        {
+            var answerUid = (Guid)context.PropertyValue;
+
+            var answer = await UnitOfWork.Answers.GetByUidAsync(answerUid);
+
+            return !answer.CorrectAnswer;
+        }
+
+        protected override string GetDefaultMessageTemplate()
+        {
+            return QuestioningErrorCodes.AnswerIsAlreadyMarkedAsCorrect;
+        }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/Contracts/AnswerInQuestionWithUidExistsDto.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/Contracts/AnswerInQuestionWithUidExistsDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/Contracts/AnswerInQuestionWithUidExistsDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,16 @@
+﻿using System;
+
+namespace FinkiChattery.Commands.Questioning.Validators.Contracts
+{
+    public class AnswerInQuestionWithUidExistsDto
+    {
+        public AnswerInQuestionWithUidExistsDto(Guid questionUid, Guid answerUid)
+        {
+            QuestionUid = questionUid;
+            AnswerUid = answerUid;
+        }
+
+        public Guid QuestionUid { get; }
+        public Guid AnswerUid { get; }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/StudentIsOwnerOfQuestion.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/StudentIsOwnerOfQuestion.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Commands/Questioning/Validators/StudentIsOwnerOfQuestion.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,33 @@
+﻿using FinkiChattery.Common.User;
+using FinkiChattery.Persistence.UnitOfWork;
+using FluentValidation.Validators;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace FinkiChattery.Commands.Questioning.Validators
+{
+    public class StudentIsOwnerOfQuestion : AsyncValidatorBase
+    {
+        public StudentIsOwnerOfQuestion(IUnitOfWork unitOfWork, ICurrentUser currentUser)
+        {
+            UnitOfWork = unitOfWork;
+            CurrentUser = currentUser;
+        }
+
+        public IUnitOfWork UnitOfWork { get; }
+        public ICurrentUser CurrentUser { get; }
+
+        protected override async Task<bool> IsValidAsync(PropertyValidatorContext context, CancellationToken cancellation)
+        {
+            var questionUid = (Guid)context.PropertyValue;
+
+            return await UnitOfWork.Questions.QuestionIsOwnedByStudent(questionUid, CurrentUser.Id);
+        }
+
+        protected override string GetDefaultMessageTemplate()
+        {
+            return QuestioningErrorCodes.StudentDoesNotOwnQuestion;
+        }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Contracts/User/GetSelfUser/SelfUserResponse.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Contracts/User/GetSelfUser/SelfUserResponse.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Contracts/User/GetSelfUser/SelfUserResponse.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,106 @@
+﻿#nullable enable
+
+using System;
+using System.Collections.Generic;
+
+
+namespace FinkiChattery.Contracts.User
+{
+    public class SelfUserResponse
+    {
+        public SelfUserResponse(StudentSelfResponse? student = null, TeacherSelfResponse? teacher = null, ModeratorSelfResponse? moderator = null)
+        {
+            Student = student;
+            Teacher = teacher;
+            Moderator = moderator;
+        }
+
+        public StudentSelfResponse? Student { get; }
+        public TeacherSelfResponse? Teacher { get; }
+        public ModeratorSelfResponse? Moderator { get; }
+    }
+
+    public class StudentSelfResponse
+    {
+        public StudentSelfResponse(Guid uid, long applicationUserId, string index, long reputation, string imageUrl, IEnumerable<StudentQuestionResponse> questions, IEnumerable<StudentTeamResponse> teams)
+        {
+            Uid = uid;
+            ApplicationUserId = applicationUserId;
+            Index = index;
+            Reputation = reputation;
+            ImageUrl = imageUrl;
+            Questions = questions;
+            Teams = teams;
+        }
+
+        public Guid Uid { get; }
+        public long ApplicationUserId { get; }
+        public string Index { get; }
+        public long Reputation { get; }
+        public string ImageUrl { get; }
+        public IEnumerable<StudentQuestionResponse> Questions { get; }
+        public IEnumerable<StudentTeamResponse> Teams { get; }
+    }
+
+    public class StudentQuestionResponse
+    {
+        public StudentQuestionResponse(Guid questionUid, string title)
+        {
+            QuestionUid = questionUid;
+            Title = title;
+        }
+
+        public Guid QuestionUid { get; }
+        public string Title { get; }
+    }
+
+    public class StudentTeamResponse
+    {
+        public StudentTeamResponse(Guid teamUid, string name)
+        {
+            TeamUid = teamUid;
+            Name = name;
+        }
+
+        public Guid TeamUid { get; }
+        public string Name { get; }
+    }
+
+    public class ModeratorSelfResponse
+    {
+        public ModeratorSelfResponse(Guid uid, long applicationUserId)
+        {
+            Uid = uid;
+            ApplicationUserId = applicationUserId;
+        }
+
+        public Guid Uid { get; }
+        public long ApplicationUserId { get; }
+    }
+
+    public class TeacherSelfResponse
+    {
+        public TeacherSelfResponse(Guid uid, long applicationUserId, IEnumerable<TeacherTeamResponse> teams)
+        {
+            Uid = uid;
+            ApplicationUserId = applicationUserId;
+            Teams = teams;
+        }
+
+        public Guid Uid { get; }
+        public long ApplicationUserId { get; }
+        public IEnumerable<TeacherTeamResponse> Teams { get; }
+    }
+
+    public class TeacherTeamResponse
+    {
+        public TeacherTeamResponse(Guid teamUid, string name)
+        {
+            TeamUid = teamUid;
+            Name = name;
+        }
+
+        public Guid TeamUid { get; }
+        public string Name { get; }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Persistence/Models/Moderator.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Models/Moderator.cs	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/FinkiChattery/FinkiChattery.Persistence/Models/Moderator.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -1,9 +1,3 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace FinkiChattery.Persistence.Models
+﻿namespace FinkiChattery.Persistence.Models
 {
     public class Moderator : BaseEntity
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/IAnswerRepo.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/IAnswerRepo.cs	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/IAnswerRepo.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -1,3 +1,5 @@
 ﻿using FinkiChattery.Persistence.Models;
+using System;
+using System.Threading.Tasks;
 
 namespace FinkiChattery.Persistence.Repositories
@@ -5,4 +7,5 @@
     public interface IAnswerRepo : IRepository<Answer>
     {
+        Task<bool> AnswerInQuestionExists(Guid questionUid, Guid answerUid);
     }
 }
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/IModeratorRepo.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/IModeratorRepo.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/IModeratorRepo.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,11 @@
+﻿using FinkiChattery.Persistence.Models;
+using FinkiChattery.Persistence.Repositories.Contracts;
+using System.Threading.Tasks;
+
+namespace FinkiChattery.Persistence.Repositories
+{
+    public interface IModeratorRepo : IRepository<Moderator>
+    {
+        Task<ModeratorSelfDto> GetModeratorSelfDto(long applicationUserId);
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/IQuestionRepo.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/IQuestionRepo.cs	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/IQuestionRepo.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -16,4 +16,8 @@
      
         Task<List<QuestionPreviewDto>> GetPreviewQuestionsPopular();
+
+        Task<bool> QuestionIsOwnedByStudent(Guid questionUid, long applicationUserId);
+
+        Task<Question> GetQuestionWithAnswersAndStudents(Guid questionUid);
     }
 }
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/IStudentRepo.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/IStudentRepo.cs	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/IStudentRepo.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -1,3 +1,4 @@
 ﻿using FinkiChattery.Persistence.Models;
+using FinkiChattery.Persistence.Repositories.Contracts;
 using System.Threading.Tasks;
 
@@ -7,4 +8,5 @@
     {
         public Task<Student> GetStudent(long applicationUserFk);
+        public Task<StudentSelfDto> GetStudentSelfDto(long applicationUserFk);
     }
 }
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/ITeacherRepo.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/ITeacherRepo.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/ITeacherRepo.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,11 @@
+﻿using FinkiChattery.Persistence.Models;
+using FinkiChattery.Persistence.Repositories.Contracts;
+using System.Threading.Tasks;
+
+namespace FinkiChattery.Persistence.Repositories
+{
+    public interface ITeacherRepo : IRepository<Teacher>
+    {
+        Task<TeacherSelfDto> GetTeacherSelfDto(long applicationUserId);
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Moderator/ModeratorSelfDto.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Moderator/ModeratorSelfDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Moderator/ModeratorSelfDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,16 @@
+﻿using System;
+
+namespace FinkiChattery.Persistence.Repositories.Contracts
+{
+    public class ModeratorSelfDto
+    {
+        public ModeratorSelfDto(Guid uid, long applicationUserId)
+        {
+            Uid = uid;
+            ApplicationUserId = applicationUserId;
+        }
+
+        public Guid Uid { get; }
+        public long ApplicationUserId { get; }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Question/StudentQuestionDto.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Question/StudentQuestionDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Question/StudentQuestionDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,16 @@
+﻿using System;
+
+namespace FinkiChattery.Persistence.Repositories.Contracts
+{
+    public class StudentQuestionDto
+    {
+        public StudentQuestionDto(Guid questionUid, string title)
+        {
+            QuestionUid = questionUid;
+            Title = title;
+        }
+
+        public Guid QuestionUid { get; }
+        public string Title { get; }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Student/StudentSelfDto.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Student/StudentSelfDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Student/StudentSelfDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,27 @@
+﻿using System;
+using System.Collections.Generic;
+
+namespace FinkiChattery.Persistence.Repositories.Contracts
+{
+    public class StudentSelfDto
+    {
+        public StudentSelfDto(Guid uid, long applicationUserId, string index, long reputation, string imageUrl, IEnumerable<StudentQuestionDto> questions, IEnumerable<StudentTeamDto> teams)
+        {
+            Uid = uid;
+            ApplicationUserId = applicationUserId;
+            Index = index;
+            Reputation = reputation;
+            ImageUrl = imageUrl;
+            Questions = questions;
+            Teams = teams;
+        }
+
+        public Guid Uid { get; }
+        public long ApplicationUserId { get; }
+        public string Index { get; }
+        public long Reputation { get; }
+        public string ImageUrl { get; }
+        public IEnumerable<StudentQuestionDto> Questions { get; }
+        public IEnumerable<StudentTeamDto> Teams { get; }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Teacher/TeacherSelfDto.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Teacher/TeacherSelfDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Teacher/TeacherSelfDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,19 @@
+﻿using System;
+using System.Collections.Generic;
+
+namespace FinkiChattery.Persistence.Repositories.Contracts
+{
+    public class TeacherSelfDto
+    {
+        public TeacherSelfDto(Guid uid, long applicationUserId, IEnumerable<TeacherTeamDto> teams)
+        {
+            Uid = uid;
+            ApplicationUserId = applicationUserId;
+            Teams = teams;
+        }
+
+        public Guid Uid { get; }
+        public long ApplicationUserId { get; }
+        public IEnumerable<TeacherTeamDto> Teams { get; }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Team/StudentTeamDto.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Team/StudentTeamDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Team/StudentTeamDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,16 @@
+﻿using System;
+
+namespace FinkiChattery.Persistence.Repositories.Contracts
+{
+    public class StudentTeamDto
+    {
+        public StudentTeamDto(Guid teamUid, string name)
+        {
+            TeamUid = teamUid;
+            Name = name;
+        }
+
+        public Guid TeamUid { get; }
+        public string Name { get; }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Team/TeacherTeamDto.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Team/TeacherTeamDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Contracts/Team/TeacherTeamDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,16 @@
+﻿using System;
+
+namespace FinkiChattery.Persistence.Repositories.Contracts
+{
+    public class TeacherTeamDto
+    {
+        public TeacherTeamDto(Guid teamUid, string name)
+        {
+            TeamUid = teamUid;
+            Name = name;
+        }
+
+        public Guid TeamUid { get; }
+        public string Name { get; }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/AnswerRepo.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/AnswerRepo.cs	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/AnswerRepo.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -1,4 +1,8 @@
 ﻿using FinkiChattery.Persistence.Context;
 using FinkiChattery.Persistence.Models;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Linq;
+using System.Threading.Tasks;
 
 namespace FinkiChattery.Persistence.Repositories
@@ -9,4 +13,12 @@
         {
         }
+
+        public async Task<bool> AnswerInQuestionExists(Guid questionUid, Guid answerUid)
+        {
+            return await DbSet
+                .AsNoTracking()
+                .Where(x => x.Question.Uid == questionUid && x.Uid == answerUid)
+                .AnyAsync();
+        }
     }
 }
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/ModeratorRepo.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/ModeratorRepo.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/ModeratorRepo.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,25 @@
+﻿using FinkiChattery.Persistence.Context;
+using FinkiChattery.Persistence.Models;
+using FinkiChattery.Persistence.Repositories.Contracts;
+using Microsoft.EntityFrameworkCore;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace FinkiChattery.Persistence.Repositories
+{
+    public class ModeratorRepo : Repository<Moderator>, IModeratorRepo
+    {
+        public ModeratorRepo(ApplicationDbContext dbContext) : base(dbContext)
+        {
+        }
+
+        public async Task<ModeratorSelfDto> GetModeratorSelfDto(long applicationUserId)
+        {
+            return await DbSet
+                .AsNoTracking()
+                .Where(x => x.ApplicationUserFk == applicationUserId)
+                .Select(x => new ModeratorSelfDto(x.Uid, x.ApplicationUserFk))
+                .FirstOrDefaultAsync();
+        }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/QuestionRepo.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/QuestionRepo.cs	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/QuestionRepo.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -144,4 +144,18 @@
                 .ToListAsync();
         }
+
+        public async Task<bool> QuestionIsOwnedByStudent(Guid questionUid, long applicationUserId)
+        {
+            return await DbSet
+                .Where(x => x.Uid == questionUid && x.Student.ApplicationUserFk == applicationUserId)
+                .AnyAsync();
+        }
+
+        public async Task<Question> GetQuestionWithAnswersAndStudents(Guid questionUid)
+        {
+            return await DbSet
+                .Include(x => x.Answers).ThenInclude(x => x.Student)
+                .FirstOrDefaultAsync(x => x.Uid == questionUid);
+        }
     }
 }
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/StudentRepo.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/StudentRepo.cs	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/StudentRepo.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -1,5 +1,7 @@
 ﻿using FinkiChattery.Persistence.Context;
 using FinkiChattery.Persistence.Models;
+using FinkiChattery.Persistence.Repositories.Contracts;
 using Microsoft.EntityFrameworkCore;
+using System.Linq;
 using System.Threading.Tasks;
 
@@ -16,4 +18,21 @@
             return await DbSet.FirstOrDefaultAsync(x => x.ApplicationUserFk == applicationUserFk);
         }
+
+        public async Task<StudentSelfDto> GetStudentSelfDto(long applicationUserFk)
+        {
+            return await DbSet
+                .AsNoTracking()
+                .Include(x => x.Questions)
+                .Include(x => x.StudentTeams).ThenInclude(x => x.Team)
+                .Where(x => x.ApplicationUserFk == applicationUserFk)
+                .Select(x => new StudentSelfDto(x.Uid,
+                                                x.ApplicationUserFk,
+                                                x.IndexNumber,
+                                                x.Reputation,
+                                                x.ImageUrl,
+                                                x.Questions.Select(y => new StudentQuestionDto(y.Uid, y.Title)),
+                                                x.StudentTeams.Select(y => new StudentTeamDto(y.Team.Uid, y.Team.Name))))
+                .FirstOrDefaultAsync();
+        }
     }
 }
Index: src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/TeacherRepo.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/TeacherRepo.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Persistence/Repositories/Implementations/TeacherRepo.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,26 @@
+﻿using FinkiChattery.Persistence.Context;
+using FinkiChattery.Persistence.Models;
+using FinkiChattery.Persistence.Repositories.Contracts;
+using Microsoft.EntityFrameworkCore;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace FinkiChattery.Persistence.Repositories
+{
+    public class TeacherRepo : Repository<Teacher>, ITeacherRepo
+    {
+        public TeacherRepo(ApplicationDbContext dbContext) : base(dbContext)
+        {
+        }
+
+        public async Task<TeacherSelfDto> GetTeacherSelfDto(long applicationUserId)
+        {
+            return await DbSet
+                .AsNoTracking()
+                .Include(x => x.TeacherTeams).ThenInclude(x => x.Team)
+                .Where(x => x.ApplicationUserFk == applicationUserId)
+                .Select(x => new TeacherSelfDto(x.Uid, x.ApplicationUserFk, x.TeacherTeams.Select(y => new TeacherTeamDto(y.Team.Uid, y.Team.Name))))
+                .FirstOrDefaultAsync();
+        }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Persistence/UnitOfWork/Contracts/IUnitOfWork.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/UnitOfWork/Contracts/IUnitOfWork.cs	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/FinkiChattery/FinkiChattery.Persistence/UnitOfWork/Contracts/IUnitOfWork.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -13,4 +13,6 @@
         IVoteRepo Votes { get; }
         IAnswerRepo Answers { get; }
+        ITeacherRepo Teachers { get; }
+        IModeratorRepo Moderators { get; }
         Task<int> SaveAsync();
     }
Index: src/FinkiChattery/FinkiChattery.Persistence/UnitOfWork/Implementations/UnitOfWork.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Persistence/UnitOfWork/Implementations/UnitOfWork.cs	(revision 80e2fe00b56a1e7950b3722c072b0ef652694640)
+++ src/FinkiChattery/FinkiChattery.Persistence/UnitOfWork/Implementations/UnitOfWork.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -14,8 +14,36 @@
         private VoteRepo _votes;
         private AnswerRepo _answers;
+        private ModeratorRepo _moderators;
+        private TeacherRepo _teachers;
 
         public UnitOfWork(ApplicationDbContext dbContext)
         {
             DbContext = dbContext;
+        }
+
+        public IModeratorRepo Moderators
+        {
+            get
+            {
+                if (_moderators == null)
+                {
+                    _moderators = new ModeratorRepo(DbContext);
+                }
+
+                return _moderators;
+            }
+        }
+
+        public ITeacherRepo Teachers
+        {
+            get
+            {
+                if (_teachers == null)
+                {
+                    _teachers = new TeacherRepo(DbContext);
+                }
+
+                return _teachers;
+            }
         }
 
Index: src/FinkiChattery/FinkiChattery.Queries/User/GetSelfUser/GetSelfUserQuery.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Queries/User/GetSelfUser/GetSelfUserQuery.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Queries/User/GetSelfUser/GetSelfUserQuery.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,46 @@
+﻿using FinkiChattery.Common.Mediator.Contracs;
+using FinkiChattery.Common.User;
+using FinkiChattery.Persistence.UnitOfWork;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace FinkiChattery.Queries.User
+{
+    public class GetSelfUserQuery : IQuery<SelfUserDto>
+    {
+        public GetSelfUserQuery()
+        {
+        }
+    }
+
+    public class GetSelfUserQueryHandler : IQueryHandler<GetSelfUserQuery, SelfUserDto>
+    {
+        public GetSelfUserQueryHandler(IUnitOfWork unitOfWork, ICurrentUser currentUser)
+        {
+            UnitOfWork = unitOfWork;
+            CurrentUser = currentUser;
+        }
+
+        public IUnitOfWork UnitOfWork { get; }
+        public ICurrentUser CurrentUser { get; }
+
+        public async Task<SelfUserDto> Handle(GetSelfUserQuery request, CancellationToken cancellationToken)
+        {
+            switch (CurrentUser.Role)
+            {
+                case UserRole.Student:
+                    var student = await UnitOfWork.Students.GetStudentSelfDto(CurrentUser.Id);
+                    return new SelfUserDto(student);
+                case UserRole.Teacher:
+                    var teacher = await UnitOfWork.Teachers.GetTeacherSelfDto(CurrentUser.Id);
+                    return new SelfUserDto(null, teacher);
+                case UserRole.Moderator:
+                    var moderator = await UnitOfWork.Moderators.GetModeratorSelfDto(CurrentUser.Id);
+                    return new SelfUserDto(null, null, moderator);
+                case UserRole.Guest:
+                default:
+                    return null;
+            }
+        }
+    }
+}
Index: src/FinkiChattery/FinkiChattery.Queries/User/GetSelfUser/SelfUserDto.cs
===================================================================
--- src/FinkiChattery/FinkiChattery.Queries/User/GetSelfUser/SelfUserDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
+++ src/FinkiChattery/FinkiChattery.Queries/User/GetSelfUser/SelfUserDto.cs	(revision 2a9d9d1387f1e5f937ba0f0357680599b3f2187c)
@@ -0,0 +1,20 @@
+﻿#nullable enable
+
+using FinkiChattery.Persistence.Repositories.Contracts;
+
+namespace FinkiChattery.Queries.User
+{
+    public class SelfUserDto
+    {
+        public SelfUserDto(StudentSelfDto? studentSelf = null, TeacherSelfDto? teacherSelf = null, ModeratorSelfDto? moderatorSelf = null)
+        {
+            StudentSelf = studentSelf;
+            TeacherSelf = teacherSelf;
+            ModeratorSelf = moderatorSelf;
+        }
+
+        public StudentSelfDto? StudentSelf { get; }
+        public TeacherSelfDto? TeacherSelf { get; }
+        public ModeratorSelfDto? ModeratorSelf { get; }
+    }
+}
