Beispiel #1
0
        async Task <Variable> GetOrThrowAsync(string name)
        {
            var entityFromDb = await _db.Variables.FirstOrDefaultAsync(s => s.Name == name);

            if (entityFromDb == null)
            {
                throw NotFoundException.CreateForEntityByName("Variable", name);
            }

            return(entityFromDb);
        }