コード例 #1
0
 public static routesViewModel ConvertToViewModel(this Switch.Data.Models.Routes obj)
 {
     return(new routesViewModel
     {
         Id = obj.Id,
         CardPAN = obj.CardPAN,
         Description = obj.Description,
         SinkNodeId = obj.SinkNode.Id,
         Name = obj.Name
     });
 }
コード例 #2
0
        public static Switch.Data.Models.Routes ConvertToEntityModel(this routesViewModel oView)
        {
            var Routes = new Switch.Data.Models.Routes();

            Routes.CardPAN     = oView.CardPAN;
            Routes.Description = oView.Description;
            Routes.Id          = oView.Id;
            Routes.Name        = oView.Name;
            Routes.Id          = oView.Id;
            // Routes.SinkNode.Id=oView.SinkNodeId;
            return(Routes);
        }