Exemplo n.º 1
0
        /// <summary>
        /// 更新通道标注状态
        /// </summary>
        /// <param name="channelUpdateLocation">通道标注状态</param>
        /// <returns>更新结果</returns>
        public IStatusCodeActionResult UpdateLocation([FromBody] FlowChannelUpdateLocation channelUpdateLocation)
        {
            FlowChannel channel = _context.Channels.SingleOrDefault(d => d.ChannelId == channelUpdateLocation.ChannelId);

            if (channel == null)
            {
                return(new NotFoundResult());
            }

            channel.Location = channelUpdateLocation.Location;
            channel.Marked   = true;
            _context.Channels.Update(channel);
            _context.SaveChanges();
            return(new OkResult());
        }
Exemplo n.º 2
0
 public IActionResult UpdateLocation([FromBody] FlowChannelUpdateLocation channelUpdateLocation)
 {
     return(_channelsManager.UpdateLocation(channelUpdateLocation));
 }