Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
NBear3使用过程中的一点疑惑
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
try  
View profile   Translate to Translated (View Original)
 More options Nov 29 2006, 10:34 pm
From: "try" <djsoft....@gmail.com>
Date: Wed, 29 Nov 2006 19:34:22 -0800
Local: Wed, Nov 29 2006 10:34 pm
Subject: NBear3使用过程中的一点疑惑
举例:
以新闻添过程来说。
一般是先单独添加分类,然后再添加新闻(其中需要选择一个分类)
普通article的添加做法
article.categoryid = dropdownlist.selectvalue
......
obarticle.add(article);

在nbear3中
category和article应该是一对多关系。
那么article的添加:
article.categroy = category.find<category>(...);
//需要把category对象赋值给artilce的category。那就需要先根据dropdownlist选择的categoryid把categor y信息select出来,这样是否太麻烦,而且效率有问题???是否我的理解有错误,还是有其它添加方法。
....
....


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Teddy  
View profile   Translate to Translated (View Original)
 More options Nov 29 2006, 10:45 pm
From: Teddy <shijie...@gmail.com>
Date: Thu, 30 Nov 2006 11:45:25 +0800
Local: Wed, Nov 29 2006 10:45 pm
Subject: Re: NBear3使用过程中的一点疑惑

如果你只给Article定义一个CategoryID属性而不是Category,那么还是可以像原来一样处理。

或者,你还可以定义一个CateoryID的同时,使用CustomQuery定义一个Category。

Teddy

On 11/30/06, try <djsoft....@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
try  
View profile   Translate to Translated (View Original)
 More options Nov 30 2006, 2:38 am
From: "try" <djsoft....@gmail.com>
Date: Wed, 29 Nov 2006 23:38:37 -0800
Local: Thurs, Nov 30 2006 2:38 am
Subject: Re: NBear3使用过程中的一点疑惑
        [FriendKey(typeof(Category))]
        [MappingName("CategoryId")]
        int CategoryId
        {
            get;
            set;
        }

        [NotNull]
        [CustomQuery("{CategoryId}=@CategoryId",LazyLoad = true)]
        Category Category
        {
            get;
            set;
        }
按照你的回复,我已经测试成功。
================
RelationType 请问是什么意思?
如果我在[CustomQuery("{CategoryId}=@CategoryId",LazyLoad =
true)]里添加RelationType 就会出错


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Teddy  
View profile   Translate to Translated (View Original)
 More options Nov 30 2006, 2:40 am
From: Teddy <shijie...@gmail.com>
Date: Thu, 30 Nov 2006 15:40:59 +0800
Local: Thurs, Nov 30 2006 2:40 am
Subject: Re: NBear3使用过程中的一点疑惑

RelationType只用于多对多关联,也就是说,如果某个属性是一个多对多关联的属性,你也可以使用CustomQuery来设置。

On 11/30/06, try <djsoft....@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google