如果数据库NotExists,实体框架代码首先运行代码

时间:2016-04-11 20:54:36

标签: c# entity-framework ef-code-first

我希望在数据库不存在的情况下进行“一次性工作”。 工作是StaticCategoriOchArea.InsertCategoryDataInDB();并且它是在第一次创建数据库之后在数据库中插入数据。

我试过这个,但我得到了stackoverflow。

data_import <- list()

for (i in seq_along(files_names)) {
data_import[[i]] <- read.csv(file = files_names[i], header=FALSE, check.names=FALSE)
colnames(data_import[[i]]) <- c('date', 'measurement')
data_import[[i]]["date"] <- as.POSIXct(data_import[[i]]["date"],"%Y-%m-%d %H:%M:%S")
}

names(data_import) <- frames_names

0 个答案:

没有答案