示例#1
0
        public GetLineActor(LineService lineService)
        {
            _lineService = lineService;

            Receive <string>(message =>
            {
                if (string.Equals(message, findAllCommand, System.StringComparison.OrdinalIgnoreCase))
                {
                    Sender.Tell(_lineService.Get());
                }
                else
                {
                    Sender.Tell(_lineService.Get(message));
                }
            });
        }
示例#2
0
        public ActionResult <Line> Get(string id)
        {
            var row = _service.Get(id);

            if (row == null)
            {
                return(NotFound());
            }

            return(row);
        }