spaki / Pluto

E-commerce POC: ASP.NET Core REST API Backend (DDD, CQRS and Event Sourcing) and React Frontend
MIT License
30 stars 4 forks source link

please give me the db initial sql,thanks! #2

Open mswinner opened 5 years ago

mswinner commented 5 years ago

PM> Add-Migration Initial Startup project 'Pluto.Domain' targets framework '.NETStandard'. There is no runtime associated with this framework, and projects targeting it cannot be executed directly. To use the Entity Framework Core Package Manager Console Tools with this project, add an executable project targeting .NET Framework or .NET Core that references this project, and set it as the startup project; or, update this project to cross-target .NET Framework or .NET Core. For more information on using the EF Core Tools with .NET Standard projects, see https://go.microsoft.com/fwlink/?linkid=2034705 PM>

mswinner commented 5 years ago

Add-Migration Initial -Context MainDbContext Microsoft.EntityFrameworkCore.Model.Validation[30000] No type was specified for the decimal column 'Price' on entity type 'Product'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values using 'HasColumnType()'. Microsoft.EntityFrameworkCore.Infrastructure[10403] Entity Framework Core 2.2.3-servicing-35854 initialized 'MainDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies Your target project 'Pluto.API' doesn't match your migrations assembly 'Pluto.Repository'. Either change your target project or change your migrations assembly. Change your migrations assembly by using DbContextOptionsBuilder. E.g. options.UseSqlServer(connection, b => b.MigrationsAssembly("Pluto.API")). By default, the migrations assembly is the assembly containing the DbContext. Change your target project to the migrations project by using the Package Manager Console's Default project drop-down list, or by executing "dotnet ef" from the directory containing the migrations project.