public async Task <IMonthDao> Get(int id) { var command = new GetMonthByIdCommand { monthId = id }; IMonthDao month = await _monthHandler.HandleAsync(command).ConfigureAwait(false); return(month); }
/// <summary> /// Gets a months by its identifiyer /// </summary> /// <returns>A new instance of <see cref="IMonthDao"/></returns> public async Task <IMonthDao> GetMonthByIdAsync(MonthDto monthDto) { IMonthDao month = null; using (var connection = _connectionProvider()) { month = await connection.QueryFirstAsync <MonthDao>( MonthsQueries.GetMonthById, new { monthID = monthDto.MonthId }, commandType : CommandType.StoredProcedure ).ConfigureAwait(false); } return(month); }