Deleting database from C#

后端 未结 7 924
感情败类
感情败类 2020-12-16 00:01

I have an MDF file that I\'m attaching to my local SQL server during testing with MSTEST and I don\'t want to have to go delete those temporary databases by hand after I\'ve

7条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-16 00:37

    Here is how you do it using Entity Framework version 6

    System.Data.Entity.Database.Delete(connectionString);
    

提交回复
热议问题