Yes certainly you can..
In LINQ to SQL, an object model is mapped to a relational database. Mapping is enabled by using attribute-based mapping or an external mapping file to describe the structure of the relational database. In both scenarios, there is enough information about the relational database that you can create a new instance of the database using the
Follow these steps to recreate the database.
public void CreateDatabase()
MyDatabase db = new MyDatabase ("c:\\MyDatabase.mdf");
If the database already exists and drop it before creating a new one. The DataContext class provides the DatabaseExists and DeleteDatabase methods to help you with this process.
The following example shows how to implement this approach:
public void CreateDatabase2()
MyDatabase db = new MyDatabase (@"c:\MyDatabase.mdf");
Console.WriteLine("Deleting old database...");
or you can point the mdf location into SQL Server folder as