Пример #1
0
        public dynamic Save(dynamic node)
        {
            try
            {
                // Try casting to a segment
                var segment = JsonConvert.DeserializeObject <NcbtSegment>(((JObject)node).ToString());

                // Save segment
                var success = segment.Save();

                // Return updated segment
                return(NcbtSegment.GetById(segment.Id));
            }
            catch (Exception e)
            {
                return(e);
            }
        }
Пример #2
0
 public dynamic GetById(int id)
 {
     return(NcbtSegment.GetById(id));
 }