public ItemDm(ItemDbDto dto) { Id = dto.Id; Name = dto.Name; Price = dto.Price; AidKitType = (AidKit)dto.AidKit; }
private static void SelectByIdTest() { Console.WriteLine("=====LEADERS====="); LeaderDbDto leadersDb = LeaderDataMapper.Instance.SelectById(_leaderDbDto.Id); Console.WriteLine($"Name: {leadersDb.Name}, Id: {leadersDb.Id}"); Console.WriteLine("=====TEAMS====="); TeamDbDto teamsDb = TeamDataMapper.Instance.SelectById(_teamDbDto.Id); Console.WriteLine($"Name: {teamsDb.Name}, Id: {teamsDb.Id}"); Console.WriteLine("=====CHILDREN====="); ChildDbDto childrenDb = ChildDataMapper.Instance.SelectById(_childDbDto.Id); Console.WriteLine($"Name: {childrenDb.Name}, Id: {childrenDb.Id}"); Console.WriteLine("=====EVENTS====="); EventDbDto eventsDb = EventDataMapper.Instance.SelectById(_eventDbDto.Id); Console.WriteLine($"Name: {eventsDb.Name}, Id: {eventsDb.Id}"); Console.WriteLine("=====ITEMS====="); ItemDbDto itemsDb = ItemDataMapper.Instance.SelectById(_itemDbDto.Id); Console.WriteLine($"Name: {itemsDb.Name}, Id: {itemsDb.Id}"); Console.WriteLine("=====FINANCES====="); FinanceDbDto financesDb = FinanceDataMapper.Instance.SelectById(_financeDbDto.Id); Console.WriteLine($"Name: {financesDb.Name}, Id: {financesDb.Id}"); }