var viewModel = from l in _context.Locations
join b in _context.Buyers
on l.id equals (b.LocationId)
select new { Buyer = c.Buyer, Location = c.Location };
foreach (var v in viewModel)
{
v.Buyer.FName = c.Buyer.FName;
v.Buyer.MName = c.Buyer.MName;
v.Buyer.LName = c.Buyer.LName;
v.Buyer.MembershipTypeId = c.Buyer.MembershipTypeId;
v.Buyer.Verified = c.Buyer.Verified;
v.Location.address = c.Location.address;
v.Location.city = c.Location.city;
v.Location.email = c.Location.email;
v.Location.phone = c.Location.phone;
v.Location.zipcode = c.Location.zipcode;
}
_context.SaveChanges();