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

            return false;
        }
Example #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;
        }
Example #3
0
 partial void DeleteUserRole(UserRole instance);
Example #4
0
 partial void UpdateUserRole(UserRole instance);
Example #5
0
 partial void InsertUserRole(UserRole instance);
Example #6
0
		private void detach_UserRole(UserRole entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
Example #7
0
		private void attach_UserRole(UserRole entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}