I've added a SQL database to my project. It's beside of the exe file in SQL folder.
I was using SQL to LINQ.
Now I wanna get a backup from it with C#.
I'm using following method :
But I've received the below Exception
public static void GetBackUp()
using (RezaRestaurant.SQL.DataClasses1DataContext dbc = new RezaRestaurant.SQL.DataClasses1DataContext())
dbc.ExecuteCommand(@"BACKUP DATABASE " + dbc.Mapping.DatabaseName + " TO DISK='c:\aaa.bak'");//Exception
Could you please guide me, how I can resolve it ?