Exemple #1
0
        public async Task Add(EchoeyRoute route)
        {
            await _context.AddAsync(route);

            await _context.SaveChangesAsync();
        }
Exemple #2
0
        public async Task <IActionResult> Post([FromBody] EchoeyRoute route)
        {
            await _repository.Add(route);

            return(CreatedAtRoute("GetRoute", new { Controller = nameof(RoutesController), Id = route.Id }, route));
        }