29 lines
680 B
C#
29 lines
680 B
C#
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
|
|
{
|
|
public static SellViewModel ToView(SellBindingModel model) => new()
|
|
{
|
|
Id = model.Id,
|
|
DateSell = model.DateSell,
|
|
UserId = model.UserId
|
|
};
|
|
|
|
public static SellBindingModel ToBinding(SellViewModel model) => new()
|
|
{
|
|
Id = model.Id,
|
|
DateSell = model.DateSell,
|
|
UserId = model.UserId
|
|
};
|
|
}
|
|
}
|