using System.Reflection.Metadata.Ecma335; using Contracts.DTO; namespace Infrastructure.Models; public class User { public Guid Id { get; set; } public string Name { get; set; } = null!; public string Password { get; set; } = null!; public decimal Balance { get; set; } public List? SpendingGroups { get; set; } public void Update(UserDto userDto) { Id = userDto.Id; if (!string.IsNullOrWhiteSpace(userDto.Name)) { Name = userDto.Name; } if (!string.IsNullOrWhiteSpace(userDto.Password)) { Password = userDto.Password; } } }