I have a DTO
as given below:
class Product
{
public float cost{set;get;}
public float sellprice{set;get}
}
And I have this ViewModel
:
public class MyViewModel
{
public Product products{set;get}
public float profit{set;get}
}
The problem is that I need to calculate profit from Product
properties but I don't know how to do it.