Hi,
I am studying asp.net core (code first). My vs 2017 version 15.5.5
I dont use connection string for default. My windows user name "USER".
'C:\Users\USERNorthwindEFCodeFirst.Contexts.NorthwindContext.mdf'. There is no slash "/" between 'C:\Users\USER and project name. so I have a error about "Access is denied"
System.Data.SqlClient.SqlException: 'CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'C:\Users\USERNorthwindEFCodeFirst.Contexts.NorthwindContext.mdf'.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.'
using NorthwindEFCodeFirst.Entities; using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NorthwindEFCodeFirst.Contexts { public class NorthwindContext: DbContext { public DbSet Customers { get; set; } public DbSet Orders { get; set; } } }