Beispiel #1
0
 /// <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);
 }
Beispiel #2
0
 /// <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;
 }