protected override IEnumerable <ContentType> GetEntities(ESPContext entityContext) { var list = from contentType in entityContext.ContentTypeSet select contentType; return(list.ToList()); }
public ESPEntityController(ESPContext context) { _context = context; udpService = new UdpRequestService(); if (_context.ESPs.Count() == 0) { ESPEntity test = new ESPEntity(); test.Id = 1; test.IPAddress = "192.168.137.37"; test.Name = "Node_1"; _context.Add(test); _context.SaveChanges(); } }
/// <summary> /// 以索引属性的方式获取或设置上下文中存储的键值 /// </summary> /// <value></value> public object this[string key] { get { if (Context != null) { return(Context.GetItem(key)); } else { return(null); } } set { if (Context == null) { Context = new ESPContext(); } Context.SetItem(key, value); } }
/// <summary> /// Initializes a new instance of the <see cref="RequestBase"/> class. /// </summary> /// <param name="context">The context.</param> public RequestBase(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="EaseDate"/> class. /// </summary> /// <param name="context">The context.</param> public EaseDate(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="PageV21Response"/> class. /// </summary> /// <param name="context">The context.</param> public PageV21Response(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="RequestHeader"/> class. /// </summary> /// <param name="context">The context.</param> public RequestHeader(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="NetworkSwitchRequest"/> class. /// </summary> /// <param name="context">The context.</param> public NetworkSwitchRequest(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="NetworkSwitchResponse"/> class. /// </summary> /// <param name="context">The context.</param> public NetworkSwitchResponse(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="PageRequest"/> class. /// </summary> /// <param name="context">The context.</param> public PageRequest(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="MixedResponse"/> class. /// </summary> /// <param name="context">The context.</param> public MixedResponse(ESPContext context) : base(context) { }
protected override ContentType UpdateEntity(ESPContext entityContext, ContentType entity) { return(entityContext.ContentTypeSet.Attach(entity)); }
/// <summary> /// 初始化一个 <see cref="EaseString"/> class 实例。 /// </summary> /// <param name="context">The context.</param> public EaseString(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="ResourceRequest"/> class. /// </summary> /// <param name="context">The context.</param> public ResourceRequest(ESPContext context) : base(context) { }
/// <summary> /// 初始化一个 <see cref="ResourcePartialResponse"/>(资源分包响应) class 实例。 /// </summary> /// <param name="context">The context.</param> public ResourcePartialResponse(ESPContext context) : base(context) { }
/// <summary> /// 初始化一个 <see cref="ResourcePackageResponse"/> class 实例。 /// </summary> /// <param name="context">The context.</param> public ResourcePackageResponse(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="IMG"/> class. /// </summary> /// <param name="context">The context.</param> public IMG(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="GatewayUpdateRequest"/> class. /// </summary> /// <param name="context">The context.</param> public GatewayUpdateRequest(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="MixedRequest"/> class. /// </summary> /// <param name="context">The context.</param> public MixedRequest(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="PageResponse"/> class. /// </summary> /// <param name="context">The context.</param> public PageResponse(ESPContext context) : base(context) { //internalImplementDataBind = true; }
public LYRIC(ESPContext context) : base(context) { }
protected override ContentType GetEntity(ESPContext entityContext, string id) { throw new System.NotImplementedException(); }
/// <summary> /// Initializes a new instance of the <see cref="GatewayUpdateResponse"/> class. /// </summary> /// <param name="context">The context.</param> public GatewayUpdateResponse(ESPContext context) : base(context) { }
protected override ContentType AddEntity(ESPContext entityContext, ContentType entity) { return(entityContext.ContentTypeSet.Add(entity)); }
public SONG(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="ResponseBase"/> class. /// </summary> /// <param name="context">The context.</param> public ResponseBase(ESPContext context) : base(context) { }
public MUSIC(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="ApplicationPartialResponse"/> class. /// </summary> /// <param name="context">The context.</param> public ApplicationPartialResponse(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="CLUV"/> class. /// </summary> /// <param name="context">The context.</param> public CLUV(ESPContext context) : base(context) { }
/// <summary> /// Initializes a new instance of the <see cref="ApplicationRequest"/> class. /// </summary> /// <param name="context">The context.</param> public ApplicationRequest(ESPContext context) : base(context) { }