RDBMS/RDBMS_lab4/ViewModels/PostViue.cs
2024-05-12 17:52:28 +04:00

19 lines
383 B
C#

using RDBMS_lab4.Models;
namespace RDBMS_lab4.ViewModels;
public class PostViue
{
public PostViue() { }
public PostViue(Post post)
{
Id = post.Id;
Name = post.Name;
Services = post.Services.Select(s => s.Id).ToList();
}
public int? Id { get; set; }
public string? Name { get; set; }
public List<int> Services { get; set; }
}