帮助我有关Linq和C# [英] Help Me About Linq And C#

查看:93
本文介绍了帮助我有关Linq和C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.

请帮帮我.

我使用c#2008和SQL Server Express 2005将数据库连接到c#,我使用LINQ

现在,我想了解如何备份和还原数据库?


很有必要,请帮助我


谢谢大家.


来自伊朗的Hamed.

Hello To Every Body.

Please Help me.

I use c# 2008 and SQL server express 2005 For connect my database to c# I use LINQ

Now I want to understand How can I Backup And Restore My Database ?


It is So necessary Please Help Me


Thank you Every Body.


Hamed From Iran.

推荐答案

我不相信您可以使用Linq备份或还原SQL数据库-但使用SQL却很容易:这里有一个示例 http://techpint.com/programming/sql -server-backup-and-restore-database-using-t-sql [
I don''t believe that you can either backup or restore an SQL database with Linq - but it is pretty easy to do with SQL: there is an example here http://techpint.com/programming/sql-server-backup-and-restore-database-using-t-sql[^]




您可以通过sql server备份到数据库.以后您可以恢复它.

备份:

Hi,

You can take backup to your database through sql server. Later you can restore it.

For Backup:

BACKUP DATABASE myDB
TO DISK='C:\myDB.bak'
WITH DESCRIPTION='Database Backup',
INIT,
PASSWORD='myPwd'




恢复:




For Restore :

RESTORE DATABASE myDB
FROM DISK='C:\myDB.bak'
WITH PASSWORD='myPwd'


这篇关于帮助我有关Linq和C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆