Не удается сохранить десятичное значение в SQL.Хотите хранить как десятичные (2,8)
Нравится 32.12345678
[Column(TypeName = "decimal(2,8)")]
[Display(Name = "Latitude")]
public decimal Latitude { get; set; }
В NuGet Consol
Failed executing DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [DredgingDatas] (
[Id] int NOT NULL IDENTITY,
[DredgerId] int NOT NULL,
[DredgingTime] datetime2 NOT NULL,
[Density] decimal NOT NULL,
[Velocity] decimal NOT NULL,
[Production] decimal NOT NULL,
[Latitude] decimal(2, 8) NOT NULL,
[Longitude] decimal(2, 8) NOT NULL,
[Tide] decimal NOT NULL,
[DredgeHead] float NOT NULL,
CONSTRAINT [PK_DredgingDatas] PRIMARY KEY ([Id]),
CONSTRAINT [FK_DredgingDatas_Dredgers_DredgerId] FOREIGN KEY ([DredgerId]) REFERENCES [Dredgers] ([DredgerId]) ON DELETE CASCADE
);
The scale (8) for column 'Latitude' must be within the range 0 to 2.