I have created some static functions that return integer. In my view I want sum of these functions. I am using following code:
@myrepository.OverDraftCount() +
@myrepository.MortgageCount() +
@myrepository.InstallmentCount()+
@myrepository.RevolvingCount()+
@myrepository.OthersCount()
But it is returning 2 + 2+ 2 + 2 + 2 instead of 10 which it considers all these function's output as string. How can I change it ?
Thanks
ViewBagproperty; like:ViewBag.Sum = // operationand in the view@ViewBag.Sum