The following code:
var billingAmount = (from l in context.Lessons
join t in context.Tariffs on l.TariffId equals t.Id
where l.StudentSemesterId == studentSemesterId
select new {
Total = t.Rate * l.Duration /60
}).FirstOrDefault();
...
BillingAmount = billingAmount >> gives error > "Cannot implicitly convert type AnonymousType# to decimal".
t.Rate is defined as a decimal in the data model so....
Shouldn't billingAmount's type be inferred as a decimal?
regards, Guy
Go to the complete details ...