public static Quote ToEntity(this QuoteVM quoteVM) { var quote = new Quote() { Id = quoteVM.Id, Symbol = quoteVM.Symbol, Open = quoteVM.Open, Hight = quoteVM.Hight, Low = quoteVM.Low, Price = quoteVM.Price, Volume = quoteVM.Volume, LatestTradingDay = quoteVM.LatestTradingDay, PreviousClose = quoteVM.PreviousClose, Change = quoteVM.Change, ChangePercent = quoteVM.ChangePercent, LastRequest = quoteVM.LastRequest }; return(quote); }
public static QuoteVM ToVM(this Quote quote) { var quoteVM = new QuoteVM() { Id = quote.Id, Symbol = quote.Symbol, Open = quote.Open, Hight = quote.Hight, Low = quote.Low, Price = quote.Price, Volume = quote.Volume, LatestTradingDay = quote.LatestTradingDay, PreviousClose = quote.PreviousClose, Change = quote.Change, ChangePercent = quote.ChangePercent, LastRequest = quote.LastRequest }; return(quoteVM); }