ibby
ibby
Explore posts from servers
CC#
Created by ibby on 4/30/2024 in #help
SignInAsync Set-Cookie header not working?
I had to set credentials: "include" in the fetch call
6 replies
CC#
Created by ibby on 4/29/2024 in #help
What should the service layer return back to a controller?
this is the Result Pattern right?
41 replies
CC#
Created by ibby on 4/29/2024 in #help
What should the service layer return back to a controller?
I think I've seen something like this before, ill check it out. Thanks!
41 replies
CC#
Created by ibby on 4/29/2024 in #help
What should the service layer return back to a controller?
This is what I was thinking at first with return a result. Everything false would mean success
public class CreateUserResult
{
public bool IsUsernameTaken { get; set; } // will map to a BadRequest()
public bool IsEmailAlreadyUsed { get; set; } // will map to a BadRequest()
public bool IsError { get; set; } // will map to a StatusCode(500)
}
public class CreateUserResult
{
public bool IsUsernameTaken { get; set; } // will map to a BadRequest()
public bool IsEmailAlreadyUsed { get; set; } // will map to a BadRequest()
public bool IsError { get; set; } // will map to a StatusCode(500)
}
41 replies