Code first???????????????
???????????? ???????[ 2016/4/26 11:49:40 ] ?????????????
????3.EF Code First
????3.1????
public bool Build()
{
try
{
var context = new FeeDbContext();
if (!context.Database.Exists())
{
new List<IDataInitializer<GDG_DbContext>>() {
new DataInit()
}.Setup<GDG_DbContext>(context);
return true;
}
return false;
}
catch (DbEntityValidationException ex)
{
StringBuilder error = new StringBuilder();
foreach (var item in ex.EntityValidationErrors)
{
foreach (var item2 in item.ValidationErrors)
{
error.Append(string.Format("{0}:{1} "?? item2.PropertyName?? item2.ErrorMessage));
}
}
Console.WriteLine("??????????????" + error);
throw ex;
}
catch (Exception e)
{
Console.WriteLine("??????????????" + e.Message);
throw e;
}
}
????3.2???
public bool Remove()
{
var context = new GDG_DbContext();
try
{
if (context.Database.Exists())
{
return context.Database.Delete();
}
return true;
}
catch (Exception e)
{
Console.WriteLine("??????????????" + e.Message);
return false;
}
finally { context.Dispose(); }
}
????3.3?????
????public bool Rebuild()
????{
????return Remove() && Build();
????}
???????????????????????漰???????????????????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 ??????