/// <summary> /// Persists changes to the data store /// </summary> /// <param name="entity">User</param> /// <returns><see cref="User"/></returns> public ServiceResponse<User> SaveUser(User entity) { Func<User> func = delegate { return this.context.Save(entity); }; return this.Execute(func); }
/// <summary> /// Login an authenticated user /// </summary> /// <param name="user"></param> public void BeginSession(Structure.Models.User user, bool persistLogin = true) { FormsAuthentication.SetAuthCookie(user.Email, persistLogin); _currentUser = user; }