public async Task <IActionResult> Put([FromBody] SessionModelRequest session) { BlSessionModelResponse sessionResponse = await _sessionService.AddOrUpdateSession(Mapper.Map <BlSessionModelRequest>(session)); return(Ok( Mapper.Map <SessionModelResponse>(sessionResponse) )); }
public async Task <IActionResult> Get(int id) { BlSessionModelResponse session = await _sessionService.GetSessionById(id); if (session == null) { return(NotFound()); } return(Ok( Mapper.Map <BlSessionModelResponse>(session) )); }