Duplicate here, however I've tried to add more step by step instructions so that it could help you and others.
Right click on src and Add > New Project. Select Class Libarary. Take note of the .NET Framework (I'm using 4.6 here), as you will have to match that with your main project.

The class library should appear in your solution.

Right click on the class library (or a sub folder where you want the Linq To Sql Classes), and Add > New Item. In the data tab (on the left), it should have the item LINQ to SQL Classes

Configure your LINQ to SQL.

In your main asp.net-5 web application, make sure your project.json is setup so that it's using the same .NET Framework as your Class Library (check first step). I'm using 4.6 here.
"frameworks": {
"dnx46": {
}
},
Still in your main asp.net-5 solution, right click on References > Add Reference.

Add the Class Library reference.

I hope this helps.