Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. Last Line Error: Name Session does not exist in Current Context.
  2.  
  3.  
  4. public ActionResult GetNewOwnerRecord(int ownerID, int propertyID)
  5. {
  6. OwnerManager ownerManager = new OwnerManager();
  7. var newOwner = ownerManager.Get(ownerID, true);
  8.  
  9. PropertyOwnerRoleViewModel newPropertyOwnerRoleViewModel = new PropertyOwnerRoleViewModel();
  10. newPropertyOwnerRoleViewModel.OwnerID = newOwner.OwnerID;
  11. newOwner.Address = new Model.Address();
  12. newPropertyOwnerRoleViewModel.Owner = newOwner;
  13. newPropertyOwnerRoleViewModel.IsPrimaryOwner = false;
  14. newPropertyOwnerRoleViewModel.OwnershipPercentage = 0;
  15. newPropertyOwnerRoleViewModel.PropertyID = propertyID;
  16.  
  17. IQueryable<PropertyOwnerRoleViewModel> currentOwnersResult = Session[_currentOwnersResult] as IQueryable<PropertyOwnerRoleViewModel>;
  18.  
  19. HttpContext.Session.GetString(_currentOwnersResult])
  20.  
  21. Error Text: 'ISession' does not contain a definition for 'GetString' and no accessible extension method 'GetString' accepting a first argument of type 'ISession' could be found (are you missing a using directive or an assembly reference?)
  22.  
  23. IQueryable<PropertyOwnerRoleViewModel> currentOwnersResult = HttpContext.Current.Session(_currentOwnersResult]) as IQueryable<PropertyOwnerRoleViewModel>;
  24.  
  25. Error Text: 'HttpContext' does not contain a definition for 'Current' and no accessible extension method 'Current' accepting a first argument of type 'HttpContext' could be found (are you missing a using directive or an assembly reference?)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement