well basically
dotnet ef
and Entity Framework pops up. dotnet ef
no longer works - moans that there are 2 project files
I can delete the .dcproj
file (and potenitally restore it) - but that makes running migrations difficult as part of a project build.
thanks, a lot to take the time an read my question.
How to handle data persistence and Immutability of tasks?
@riosje https://www.litedb.org/. It's small and easy to embed.
Sorry but I'm closer to getting crazy...
I want dashboard be my starting controller when I started my asp.net core web app so I've defined it in my Configure method such like...
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Dashboard}/{action=Index}");
});
And I also defined my DashBoard controlled as ...
[Route("[controller]")]
public class DashboardController : Controller
{
But when I start the IIS it seems doesn't work as is not loading the Dashboard tought If I'd wrote /Dashboard it works.
Any idea what I'm doing wrong?
Thnks!
Hey guys!
I have ran into windows authentication issue. Could someone please explain the difference between User.IsInRole("Users")
and User.IsInRole("DOMAIN\\Users")
?
When I call User.IsInRole("DOMAIN\\Users")
, it takes forever (~ 3000ms to 9000ms) and returns false which blows my mind away.
And with User.IsInRole("DOMAIN\\Users")
, it takes between 2ms to 128ms.
so this is all sorts of weird.... and please tell me where I should go to for support on this if this isn't the right place!
I am utilizing Microsoft.AspNetCore.JsonPatch and am sending the following patch to my api:
[
{
"op": "add",
"path": "/claims/baManager/-",
"value": "adsffadsdfas"
},
{
"op": "add",
"path": "/claims/Groups/-", // also tried with /claims/groups/-
"value": "agroup"
}
]
the relevant part of the model I am updating:
/// <summary>
/// Claims
/// </summary>
public Dictionary<string, List<string>> Claims { get; set; } = new Dictionary<string, List<string>>();
so here's the weirdness... baManager gets an item added to it... groups does not.
For operation 'add', the target location specified by path '/claims/Groups/-' was not found.
what in the heck is going on, here?
Services.AddControllers()
;
I have created a sample Web API project. now I add controllers into a separate class library project. I am able to use those api. I add swagger package in class library project for documentations but I am not able to access swagger. Is swagger suppose to work if I add packages in class library project instead of Web API Project.
Yes, that should work. Are you calling services.AddSwagger(...config)
and app.UseSwaggerUi()
as well?
ASPNETCORE_Environment
= ClientGen
though
Thanks @alsami , I have same issue with swagger-ui and I doubt for this specific scenario swagger is not able identify the available api in current assembly.
I've actually figured it out. It's really not the location of the controllers but the fact, that all the parameters for the swagger-gen and ui must match exactly.