private ITopicRepository _topic; private IRepository<TopicNode> _node; public UserManager<User> UserManager { get; } public HomeController(ITopicRepository topic, IRepository<TopicNode> node, UserManager<User> userManager) { _topic = topic; _node = node; UserManager = userManager; }
10.·¢²¼
֮ǰд¹ý¶ÔÓ¦µÄ·¢²¼ÎÄÕ ASP.NET Core ·¢²¼ÖÁLinuxÉú²ú»·¾³ Ubuntu ϵͳ
ÓÉÓÚproject.json ¸Ä³Écsproj,·¢²¼ÓÐËù±ä¶¯¡£
ĬÈÏ·¢²¼»¹ÊÇÏàͬ dotnet publish£¬×Ô´øÔËÐÐʱ·¢²¼Ê±¸ü¸Äcsproj¡£
±à¼ NetCoreBBS.csproj
<RuntimeIdentifiers>ubuntu.14.04-x64</RuntimeIdentifiers>
ºóÐøͬÑùÊÇ dotnet publish -r ubuntu.14.04-x64
×¢ÒâÕâ¸ö½Úµã£¬Ä¬ÈÏ·¢²¼µÄ£¬·þÎñÆ÷Ò²Òª°²×°Ïàͬ°æ±¾µÄruntime¡£
<RuntimeFrameworkVersion>1.0.0</RuntimeFrameworkVersion>
´úÂëÀïÃ滹ÓÐһЩ´ó¼Ò¿ÉÒÔ×Ô¼ºÈ¥ÍÚ¾ò¡£
NETCoreBBS ÔÚRC2 µÄʱºò¾ÍÒѾ¿ªÊ¼ÁË£¬ÓкܶàÈËÓ¦¸ÃÒѾ¿´¹ýÕâ¸öÏîÄ¿£¬ÕâƪÎÄÕÂÊÇÈôó¼Ò¸üÇå³þµÄÁ˽âÕâ¸öÏîÄ¿¡£
¡¡