// ************************************** // TakeOwnerShip // ************************************** public static void TakeOwnerShip(int userId) { using (var ctx = new SongSearchContext()) { var user = ctx.GetUser(userId); if (user != null) { ctx.TakeOwnerShip(user); ctx.SaveChanges(); } user = null; } }