using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using WebApi.Data; namespace MyApp.Namespace; [Route("[controller]")] [ApiController] public class DictionaryController(DictionaryDbContext dictionaryDbContext) : ControllerBase { private readonly DictionaryDbContext _dictionaryDbContext = dictionaryDbContext; [HttpGet] public async Task GetWordDetailAsync(string word) { var result = _dictionaryDbContext.Dicts.Find(word); await Task.Delay(10); return Ok(result); } }