示例#1
0
 public static void RegisterRoute(string routeName, RoutingInfo routingInfo)
 {
     TableServiceContext tableContext = GetTableContext();
     RouteEntity entity = new RouteEntity(routeName, routingInfo);
     //this performs an Upsert (InsertOrRepalce)
     tableContext.AttachTo(_tableName, entity, null);
     tableContext.UpdateObject(entity);
     tableContext.SaveChanges();
     _configCache.Remove(_partitionKey);
 }
示例#2
0
        public static void RegisterRoute(string routeName, RoutingInfo routingInfo)
        {
            TableServiceContext tableContext = GetTableContext();
            RouteEntity         entity       = new RouteEntity(routeName, routingInfo);

            //this performs an Upsert (InsertOrRepalce)
            tableContext.AttachTo(_tableName, entity, null);
            tableContext.UpdateObject(entity);
            tableContext.SaveChanges();
            _configCache.Remove(_partitionKey);
        }
示例#3
0
 public RouteEntity(string routeName, RoutingInfo routingInfo)
     : base(_partitionKey, routeName)
 {
     persist = GenericDataContractSerializer<RoutingInfo>.WriteObject(routingInfo);
 }
示例#4
0
 public RouteEntity(string routeName, RoutingInfo routingInfo)
     : base(_partitionKey, routeName)
 {
     persist = GenericDataContractSerializer <RoutingInfo> .WriteObject(routingInfo);
 }