예제 #1
0
        public bool CreateUserRole(UserRole instance)
        {
            if (instance.ID == 0)
            {
                Db.UserRole.InsertOnSubmit(instance);
                Db.UserRole.Context.SubmitChanges();
                return true;
            }

            return false;
        }
예제 #2
0
        public bool UpdateUserRole(UserRole instance)
        {
            UserRole cache = Db.UserRole.Where(p => p.ID == instance.ID).FirstOrDefault();
            if (cache != null)
            {
                //TODO : Update fields for UserRole
                Db.UserRole.Context.SubmitChanges();
                return true;
            }

            return false;
        }
예제 #3
0
		private void detach_UserRole(UserRole entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
예제 #4
0
		private void attach_UserRole(UserRole entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}
예제 #5
0
 partial void DeleteUserRole(UserRole instance);
예제 #6
0
 partial void UpdateUserRole(UserRole instance);
예제 #7
0
 partial void InsertUserRole(UserRole instance);