how to conver Linq to sql : How can I can I write this sql queryt to linq

    select c.Name as 'Name', s.Status from (select * , ROW_NUMBER() over (partition by CustomerID order         by Date desc) rn
    from CustomerStatus) detail
    inner join Status s
    on detail.Status = s.Id
    inner join
    Customers c
    on detail.CustomerId = c.Id
    where detail.rn = 1

Here I am unable to convert this sql to linq how can do this??

