You have a lot going on in this query, please let me know if you have any questions.
using(var context = new YourContext())
{
var query = from sl in context.StorageLocations
from pl in context.PartLocations.Where(x => sl.Id == x.StorageLocationId).DefaultIfEmpty()
from t in
(
from tr in context.Transactions
where tr.Active == "1"
group tr by tr.PartLocationId into g
select new {
PartLocationId = g.Key,
Quantity = g.Sum(y => y.TransactionTypeId == 2 ? (y.Quantity * -1) : y.Quantity)
}
).Where(x => pl.Id == x.PartLocationId).DefaultIfEmpty()
where t.Quantity < 1 || t.Quantity == null
select new
{
sl.Id,
sl.Name,
t.Quantity
};
var result = query.ToList();
}