« first day (4041 days earlier)      last day (914 days later) » 

7:35 AM
[Squirrel in Training] GoOoOoOoOoOoOoOoOoOoOoOd Mornin' pleberinos!
 
Good morning
 
 
3 hours later…
10:24 AM
Hi all,
Why it's needed to explicitly put Route attribute above action methods , so swagger works (fetch APIs)?
example:

[HttpGet("WorkScheme")]
public IActionResult WorkScheme()
This only causes swagger error:

[HttpGet]
public IActionResult WorkScheme()
{}
 
So the framework knows that that method is supposed to be called on a GET request
Oh
Usually the route parameter is optional, unless you have a duplicate
Do you have a duplicate?
What does swagger say?
 
there are multiple GET methods, yes
does it need one default?!
 
Multiple get methods with the same route
The controller has a base route, maybe /api/account
 
different action method names, but without route being declared
 
Then you can have multiple methods in there and give them routes.
There is no "without" route
Everything that has a POST or GET endpoint has a route
If you make it HttpGet, it's a GET endpoint on the address of the controller
like /api/account
So if you have two methods, and each has [HttpGet], both are mapped to /api/account
Which obviously doesn't work because that's not how the internet works
 
10:30 AM
but why it doesn't generate the endpoint name from the action method name? is it configurable?
 
Name?
Or route?
Because maybe you want to have a different route than the name of the method?
 
example:

[HttpGet]
public IActionResult WorkScheme()
{}

I expected to generate: GET api/[controller]/WorkScheme

that should be the default
 
It should absolutely not be the default
[HttpGet]
public Account GetAccountById([FromQuery]int id){}

Should definitely be on the root, just GET /api/account?id=3
 
why?
If I need different rout, I set it explicitly
 
If I need the route of the controller itself though?
Do I [HttpGet("/")] or what?
And that would technically be incorrect because there is no slash after the last part of the route
 
10:36 AM
@Squirrelkiller yes in a controller that have 3 or 4 actions; one for each HTTP method, I agree, but not with large controllers
I have such controller, and what I'm doing now, is copy action method name, paste it int HttpGet/Post ctor..
 
 
3 hours later…
1:33 PM
the problem is that with the approach you use, this default makes sense
but with the approaches that other people use, it does not
so, not having that default makes more sense
also the naming, assuming you both follow REST and C#, should be different
it should be GetWorkScheme() in the code and /workschemes in the url
 
2:27 PM
I can't believe it myself but I totally agree with Wietlol here
 
whoah
I have this set up:
public class SomeClass
{
    public ObservableCollection<PageViewModel> MainNav { get; set; }

    private PageViewModel _selectedPage;

    public PageViewModel SelectedPage
    {
        get { return _selectedPage; }
        set
        {
            _selectedPage = value;
            // Property Changed...}
        }
    }

    public SomeClass()
    {
        MainNav = new ObservableCollection<PageViewModel>
        {
            new PageViewModel
            {
                Title = "Title",
Then within the ViewModel I do something like so:
public class ViewModel
{
    public SomeClass SomeClass { get; set; }
    public object Object { get; set; }
    public ViewModel(SomeClass someClass, object recieveObject)
    {
        this.SomeClass = someClass;
    }

    private void Method()
    {
        // Can access the nav like so..
        SomeClass.SelectedPage = SomeClass.MainNav[0].Children[0];
    }
}
 
That smells
 
Within the ViewModel, Method() how can I pass an object through to new ViewModel(this, object sendObject)?
 
I don't know how exactly yet but it smells
 
smells of?
 
2:34 PM
squidward
 
Why does the inner viewmodel have a reference back to the outer class?
 
to access the SelectedPage property
 
Why would it need that?
 
to navigate the navigation from the sub content
 
Either it is the selected page itself, or it should not do anything
 
2:50 PM
ah
got it
 
3:08 PM
should of had the nav system as Interface
 
Ryan Donovan on November 08, 2021
Design systems enable developers and designers to rapidly develop products that are consistent across all platforms. Existing design standards could be directly applied in the Metaverse. But many other concepts, unique to 3D environments, required a lot of definition.
 
3:29 PM
hm I suddenly have an unnatural urge to commit IT genocide
 
3:39 PM
do it
 
 
2 hours later…
Oh shit
 
5:32 PM
Hello guys
 
Heyho!
 
I have a query
I want to deploy a dot net application in a droplet (vultr vm instance). Question is how to make it https supported? Do I just need to install certificate in that vm and it will just work or is there any other thing that I need to take care?
 
6:21 PM
it's finished?? OoO
 
6:49 PM
@Squirrelkiller sorry, my example didn't make sense - I totally did the example incorrectly -_-
 
@bluetoothfx I have no idea what vultr is, but every hoster should provide an HTTPS FAQ
 
@Squirrelkiller this is what I meant:
public class SomeClass
{
    public ObservableCollection<PageViewModel> MainNav { get; set; }

    private PageViewModel _selectedPage;

    public PageViewModel SelectedPage
    {
        get { return _selectedPage; }
        set
        {
            _selectedPage = value;
            // Property Changed...}
        }
    }

    public SomeClass()
    {
        MainNav = new ObservableCollection<PageViewModel>
        {
            new PageViewModel
            {
                Title = "Title",
public class ViewModelOne
{
    public SomeClass SomeClass { get; set; }

    public ViewModelOne(SomeClass someClass)
    {
        this.SomeClass = someClass;
    }

    private void Method()
    {
        // Can access the nav like so..
        SomeClass.SelectedPage = SomeClass.MainNav[0].Children[1]; // navigate to ViewModelTwo
    }
}
 
 
5 hours later…
mr5
11:40 PM
let the suffering begin
 

« first day (4041 days earlier)      last day (914 days later) »