我试图在用户指挥数据库中更新记录,我想知道这样做的最佳办法。 我猜测,我缺乏正确的术语来研究我应当使用的适当工具和模式。
<>1>
我开始试图撰写一份可以称之为“快车牌”功能的 Java字功能,但我怀疑,Im离开了产生伙伴关系的许多权力和功能。 NET 核心应用。
<>2>
拉扎尔的网页本应取代ASP。 NET 因此,在MVC系统中,在为返还观点组成部分而设置的对依赖性注射的同时,似乎也多余。 因此,我认为,必须找到办法,通过平坐页而不是按照模型、观点、控制器夹对项目进行泥.。
该项目与伙伴关系项目相同。 除在没有boot锁的情况下重建外,在甚小区建立了网络核心模板。
因此,它有一个<代码>_layout.cshtml,其中部分使用使用户菜单。
If it helps, the website is studiobreifcase.com, and public in my git repo.
https://github.com/TAReber/StudioBriefcase-Web-App
你们可以打着它,管理它,但我不敢肯定什么工作,什么是徒劳的。
目前的目标只是将产出记录在青春期。
<代码>_menu Partial.cshtml, 载于_layout.cshtml
:
@{
}
// ... irrelevant code
@if (Context.User.Identity?.IsAuthenticated == true)
{
// ...
<select id="Menu_RoleDropdown" onchange="updateUserRole()">
<option value="Default">Anonymous</option>
<option value="Regular">Regular</option>
// ...
</select>
}
else
{
// OAuth Login stuff
// irrelevant code
...
}
<script>
async function updateUserRole() {
var selectedRole = document.getElementById("Menu_RoleDropdown").value;
console.log(selectedRole);
// Attempted to access a function in UserService.cs but failed.
}
</script>
www.un.org/Depts/DGACM/index_spanish.htm
namespace StudioBriefcase.Services
{
public class UserService : IUserService
{
// ... Members, Constructor and other methods.
// Function I failed to call
public Task SetUserRole(string role)
{
_logger.LogError($"Setting user Role to {role}");
throw new NotImplementedException();
}
}
}
我只想在这一尝试中产生原木产出。 我没有成功。 这可能是好的,因为我不知道我做些什么,而且我不得不第一次做坏事。
我猜测这个问题是很宽泛的,但任何帮助都有助于了解我应该/应该利用哪些模式和做法来与安森系统连接。