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

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