Asp.net: 获取虚拟路径地址
HttpContext.Current.Server.MapPath("路径/位置")
将一个数组类型转换为另一个数组类型
Array.ConvertAll<string, int>(majorIDS.Split(‘,‘), s => int.Parse(s))
<iframe scrolling="no" src="" frameborder="0" style="width: 100%; height: 100%;overflow:hidden;border-style: none"></iframe>
DbContext写法
public class BaseContext : DbContext
{
public BaseContext()
: base("name=DomeConn")
{
}
public DbSet<Person> Person { get; set; }
public DbSet<NewsEneity> NewsEntity { get; set; }
//生成的实体 去复数s
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
}
}
时间: 2024-10-03 21:54:17