Conditional sum in query

I meant to do this using Linq. Is possible to conditionally sum with Linq?