public CustomerSession SaveCustomerSession(Guid customerSessionGuid, int customerId, DateTime lastAccessed, bool isExpired) { var customerSession = _customerSessionRepository.GetCustomerSessionByGuid(customerSessionGuid); if (customerSession == null) { customerSession = new CustomerSession() { CustomerSessionGuid = customerSessionGuid, CustomerId = customerId, LastAccessed = lastAccessed, IsExpired = isExpired }; _customerSessionRepository.InsertCustomerSession(customerSession); } else { customerSession.CustomerSessionGuid = customerSessionGuid; customerSession.CustomerId = customerId; customerSession.LastAccessed = lastAccessed; customerSession.IsExpired = isExpired; _customerSessionRepository.UpdateCustomerSession(customerSession); } return(customerSession); }
public CustomerSession UpdateCustomerSession(CustomerSession entity) { return(_iCustomerSessionRepository.UpdateCustomerSession(entity)); }