数据库插不进数据
初始化服务器那里显示下面的警告,在初始化方法那里把price做了显示类型转换也不行还是显示警告,把noodle类的price类型改成int之后,警告倒是没有了,但还是插不进数据
warn: Microsoft.EntityFrameworkCore.Model.Validation[30000]
No type was specified for the decimal column 'Price' on entity type 'Noodle'. 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 'ForHasColumnType()'.