public async Task <BrewModel> GetByIdAsync(Guid id, bool getRelated) { BrewModel model = null; if (id != Guid.Empty) { model = getRelated ? await brewRepository.GetBrewAndRelatedEntitiesAsync(id) : await brewRepository.GetByIdAsync(id); } return(model); }