PIAPS_CW/Contracts/Converters/SellConverter.cs

29 lines
680 B
C#
Raw Normal View History

2024-06-23 20:39:28 +04:00
using Contracts.BindingModels;
using Contracts.ViewModels;
using DataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Contracts.Converters
{
public class SellConverter
{
2024-06-23 20:39:28 +04:00
public static SellViewModel ToView(SellBindingModel model) => new()
{
Id = model.Id,
DateSell = model.DateSell,
2024-06-24 15:06:42 +04:00
UserId = model.UserId
2024-06-23 20:39:28 +04:00
};
2024-06-23 20:39:28 +04:00
public static SellBindingModel ToBinding(SellViewModel model) => new()
{
Id = model.Id,
DateSell = model.DateSell,
2024-06-24 15:06:42 +04:00
UserId = model.UserId
2024-06-23 20:39:28 +04:00
};
}
}