Skip to content

Commit 0f66459

Browse files
new: now it really works correctly
1 parent 7322974 commit 0f66459

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

DataTransferObjects/EditSensorDTO.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class EditSensorDTO
66

77
public string? Nome { get; set; }
88

9-
public DateOnly? DataColheita { get; set; }
9+
public DateTime? DataColheita { get; set; }
1010

1111
public decimal? Latitude { get; set; }
1212

Repositories/SensorRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void Register(EditSensorDTO newSensor)
8181
var sensor = new Sensor()
8282
{
8383
CategoriaId = newSensor.CategoriaId,
84-
DataColheita = newSensor.DataColheita,
84+
DataColheita = new DateOnly(newSensor.DataColheita.Value.Year, newSensor.DataColheita.Value.Month, newSensor.DataColheita.Value.Day),
8585
Latitude = newSensor.Latitude,
8686
Longitude = newSensor.Longitude,
8787
PhSoloIdeal = newSensor.PhSoloIdeal,

0 commit comments

Comments
 (0)