slarny4/Demo1/UI/UserConsole.cs

21 lines
537 B
C#
Raw Normal View History

2024-10-21 22:57:01 +00:00
using Demo.Domain.Models;
namespace Demo.UI
{
public class UserConsole
{
private readonly Demo.Domain.Models.User user;
public UserConsole(Demo.Data.LocalData.Entity.LocalUser entityUser) // Принимаем Entity User
{
// Преобразуем entityUser в Domain User
this.user = (Demo.Domain.Models.User)entityUser;
}
public void DisplayUserInfo()
{
Console.WriteLine($"Имя: {user.FullName}, ID: {user.Id}");
}
}
}