public static ItemModel ToModel(InventoryRepository.ItemModel respositoryModel) { var itemModel = new ItemModel { ItemId = respositoryModel.ItemId, ItemName = respositoryModel.ItemName, ItemDescription = respositoryModel.ItemDescription, ItemPrice = respositoryModel.ItemPrice, ItemQuantity = respositoryModel.ItemQuantity, ItemValue = respositoryModel.ItemValue, ItemCreationDate = respositoryModel.ItemCreationDate, }; return(itemModel); }
public InventoryRepository.ItemModel ToRepositoryModel() { var repositoryModel = new InventoryRepository.ItemModel { ItemId = ItemId, ItemName = ItemName, ItemDescription = ItemDescription, ItemPrice = ItemPrice, ItemQuantity = ItemQuantity, ItemValue = ItemValue, ItemCreationDate = ItemCreationDate, }; return(repositoryModel); }