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

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

            return(Ok());
        }
Example #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());
        }