예제 #1
0
파일: UserRole.cs 프로젝트: supercawa/CarGo
        public bool CreateUserRole(UserRole instance)
        {
            if (instance.Id == 0)
            {
                Db.UserRole.InsertOnSubmit(instance);
                Db.UserRole.Context.SubmitChanges();
                return true;
            }

            return false;
        }
예제 #2
0
파일: UserRole.cs 프로젝트: supercawa/CarGo
        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;
		}