Exemplo n.º 1
0
 public IActionResult RegisterAgent([FromBody] string agentAddress)
 {
     _logger.LogInformation("Регистриция агента");
     _repository.Create(new Agents {
         AgentUrl = agentAddress
     });
     return(Ok());
 }
Exemplo n.º 2
0
        public IActionResult RegisterAgent([FromBody] AgentInfoRequest agentInfo)
        {
            _logger.LogInformation("Регистрация агента");

            _repository.Create(_mapper.Map <AgentInfo>(agentInfo));

            return(Ok());
        }
Exemplo n.º 3
0
        public IActionResult RegisterAgent([FromBody] AgentModel agentInfo)
        {
            _repository.Create(agentInfo);

            _logger.LogInformation("Добавление в базу агента: " +
                                   $"Id = {agentInfo.Id}" +
                                   $" IpAddress = {agentInfo.IpAddress}" +
                                   $" Name = {agentInfo.Name}" +
                                   $" Status = {agentInfo.Status}");

            return(Ok());
        }