DB integration added, multiple images for equipment
This commit is contained in:
@@ -6,6 +6,8 @@ namespace GazpromApp.ViewModels;
|
||||
|
||||
public partial class PointViewModel : ViewModelBase
|
||||
{
|
||||
private Point Point { get; }
|
||||
|
||||
[ObservableProperty]
|
||||
private string? _name;
|
||||
|
||||
@@ -20,14 +22,15 @@ public partial class PointViewModel : ViewModelBase
|
||||
|
||||
// EF stuff
|
||||
[ObservableProperty]
|
||||
private List<Image>? _images;
|
||||
private List<Image> _images;
|
||||
[ObservableProperty]
|
||||
private List<Equipment>? _equipment;
|
||||
private List<Equipment> _equipment;
|
||||
[ObservableProperty]
|
||||
private List<Property>? _properties;
|
||||
private List<Property> _properties;
|
||||
|
||||
public PointViewModel(Point point)
|
||||
{
|
||||
Point = point;
|
||||
Name = point.Name;
|
||||
Description = point.Description;
|
||||
Latitude = point.Latitude;
|
||||
@@ -39,13 +42,11 @@ public partial class PointViewModel : ViewModelBase
|
||||
|
||||
public Point GetPoint()
|
||||
{
|
||||
return new Point
|
||||
{
|
||||
Name = Name,
|
||||
Description = Description,
|
||||
Equipment = Equipment ?? [],
|
||||
Images = Images ?? [],
|
||||
Properties = Properties ?? []
|
||||
};
|
||||
Point.Name = Name;
|
||||
Point.Description = Description;
|
||||
Point.Equipment = Equipment;
|
||||
Point.Images = Images;
|
||||
Point.Properties = Properties;
|
||||
return Point;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user