Пример #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
 partial void DeleteUserRole(UserRole instance);
Пример #4
0
 partial void UpdateUserRole(UserRole instance);
Пример #5
0
 partial void InsertUserRole(UserRole instance);
Пример #6
0
		private void detach_UserRole(UserRole entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
Пример #7
0
		private void attach_UserRole(UserRole entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}