???ASP.NET 5????????????
???????????? ???????[ 2015/1/27 17:44:58 ] ?????????????
?????????????????????
using BlogASPNET5.Entity.Accounts;
using BlogASPNET5.Repository.Contexts;
using System.Linq;
namespace BlogASPNET5.Repository.Migrations
{
public static class SampleData
{
static EFContext db = new EFContext();
public static void SetData()
{
db.Database.EnsureDeleted();
db.Database.EnsureCreated();
db.Add(
new Role { Name = "manage"?? Description = "?????" }??
new Role { Name = "member"?? Description = "???" });
db.SaveChanges();
//CoreCLR???????????????
for (int i = 1; i <= 1000; i++)
{
db.Add(
new User
{
Name = "admin" + i??
Password = "abc" + i??
Gender = Gender.man??
Role = db.Roles.Single(r => r.Name == "manage")
});
db.SaveChanges();
}
for (int i = 1; i <= 1000; i++)
{
db.Add(
new User
{
Name = "member" + i??
Password = "efg" + i??
Gender = Gender.woman??
Role = db.Roles.Single(r => r.Name == "member")
});
db.SaveChanges();
}
}
}
}
|
????1.3????
??????????????????
using BlogASPNET5.Repository.Contexts;
using BlogASPNET5.Repository.Migrations;
using System;
namespace BlogASPNET5.ConsoleApp
{
public class Program
{
public void Main(string[] args)
{
//??????????????????????
SampleData.SetData();
Console.WriteLine("set data OK!");
Console.ReadLine();
using (var db = new EFContext())
{
var lists = db.Users;
foreach (var item in lists)
{
Console.WriteLine(item.Name);
}
}
Console.ReadLine();
}
}
}
|
??????????????? EF7 beta2????????????????????????????MigrationHistory??????????????????
????2.С??
???????????????????????????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
?????????????????????????Щ????????????????????TC???????????????Щ???????????????????????????????????????????????(java .net ?????)???mysql???????????????????ж????д???Python???????????????(DB2)??????BufferPool????????????????????????????????6??????????????????滮???????????????-????????SQL Server???????????????????λ?????PHP??SQL????????????????????Pythonд???NoSQL????????? SQL ?е????????????? SQL ?е?????????Java???????:?????MySQL???????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????