English 中文(简体)
如何将我的模型分配给内在用户
原标题:How to assign my models to built-in users

I am trying to implement a foreign key connection between the built-in User model and my models in ASP.NET MVC 3.

如何把所有权或其他一些角色分配给我模式所代表的各种条目。 我的模式如何看待:

public class Entry
{
    public int Id { get; set; }
    public string Value { get; set; }
    public User Owner { get; set; }
    public User SomeoneElse { get; set; }
}

在为用户寻找模式的地方,我需要进口什么? 还是有更好的办法实现这一目标?

最佳回答

你们是否使用实体框架? 如果是,

www.un.org/Depts/DGACM/index_spanish.htm 简单解决办法

您可以简单地将《指南》与“Built-Inuser”模式保持一致。 你赢得的只是“真实关系”,但会为你们想要做的事情trick。 你们总是能够以<条码”接收用户。 ProviderUserKey

www.un.org/Depts/DGACM/index_spanish.htm 其他更为复杂的项目

完全改写并压倒成员制作和记录模块。 这样,你就能够使用自己的用户物体,并增加其他财产。

www.un.org/Depts/DGACM/index_spanish.htm 页: 1

不清楚这是否将与<代码>上的自动生成表格合作。 成员:,但可以增加外国关键财产:

    [ForeignKey("User")]
    public Guid UserId { get; set; }
问题回答

暂无回答




相关问题
Using jquery to get a partial view and updating the UI

I need to render a partial view (returned from the controller) to show some customer summary details. This will need to happen when the user clicks on a button. In the the mean time the user can ...

MVC 2 / MVC 3 / MVC 4

MVC 2 我们可以轻松地创造领域。 现在,我的问题涉及nes地区(地区内)。

Asp.Net MVC 2 - Changing the PropertyValueRequired string

Using a resx file in the App_GlobalResources directory, I ve been able to change the default message for the PropertyValueInvalid string of the model validators. But it doesn t work to translate the ...

ASP.NET MVC 3 - What features do you want to see? [closed]

I know a bunch of people that are really enjoying the improvements that ASP.NET MVC 2 made over the first release. I have just started to migrate our MVC 1 project over and so far areas has totally ...

热门标签