API Controller
[HttpGet] public HttpResponseMessage Get() { using (LeaderBordContext db = new LeaderBordContext()) { List<Game> games = db.Games.OrderBy(a => a.Name).ToList(); HttpResponseMessage response; response = Request.CreateResponse(HttpStatusCode.OK, games); return response; } } Context
public class LeaderBordContext : DbContext { public DbSet<Gamer> Gamers { get; set; } public DbSet<Game> Games { get; set; } public LeaderBordContext() : base("LeaderBordContext") {} } The server returns an error
"An error has occurred.", "ExceptionMessage": "Cannot create file 'C: \ Users \ PC \ Documents \ Visual Studio 2013 \ Projects \ LeaderBord \ LeaderBord \ App_Data \ lbdb.mdf' because it already exists. Change the file I’m not able to create a file name or a file name.
The string to connect to the database in the Web.config file indicated. What could be?