コード例 #1
0
ファイル: Auth.cs プロジェクト: jeromeyers/psychlotron
 public static Guid NewPsyauth(User user)
 {
     using (var dc = new PsyDc()) {
         var session = new Session() {
             DateCreated = DateTime.Now,
             SessionId = Guid.NewGuid(),
             UserId = user.UserId
         };
         dc.Sessions.InsertOnSubmit(session);
         dc.SubmitChanges();
         if (session.SerialNumber > 0) {
             return session.SessionId;
         }
     }
     return Guid.Empty;
 }
コード例 #2
0
 partial void DeleteSession(Session instance);
コード例 #3
0
 partial void UpdateSession(Session instance);
コード例 #4
0
 partial void InsertSession(Session instance);
コード例 #5
0
		private void detach_Sessions(Session entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
コード例 #6
0
		private void attach_Sessions(Session entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}