0
Good night,
I am unable to connect to the database to create the Models folder tables in .NET. When I try to make the Migrations returns this error:
"Could not run because the specified command or file was not found. Possible reasons for this include:
You have incorrectly typed an internal dotnet command. You intended to run a . NET program, but dotnet-Ef does not exist. You intended to run a global tool, but could not find an executable with dotnet prefix with that name in the PATH."
The command I used to make Migrations was this: dotnet Ef Migrations add
I have already made the Dbcontext configuration this way:
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace APIVirtualCard.Data
{
public class VCContext : DbContext
{
public DbSet<Card> Cards { get; set; }
public DbSet<Email> Emails { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer("server=.;database=myDb;trusted_connection=true;");
}
}
}````