paun
paun
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
And the stuff it didn't do could be done by calling the methods you've made
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
It basically did everything
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
thanks a lot for the help too
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
you jsut need to make endpoints for them
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
those marked with 0 are easy to do
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
No description
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
Well it isn't hard, it's just bothersome to write friends
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
I need to make one for friends which is slightly harder
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
I basically did this without even looking at anything I'm proud of myself
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
No description
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
It works
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
Just try stuff out, see how it works
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
I wanted to keep it simple for now
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
I'm gonna do this part myself, including the POST, GET, PUT endpoints
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.Urls.Add("https://localhost:5000");

InMemoryDatabase db = new InMemoryDatabase();

app.MapGet("/", () => "Hello World!");

app.MapGet("/person/fetch/{id}", (int id) => db.FetchPerson(id));
app.MapGet("/person/add/{id}/{name}/{age}", (int id, string name, string age) => db.AddPerson(id, name, age));
app.MapGet("/person/update/{id}/{name}/{age}", (int id, string name, string age) => db.UpdatePersonPut(id, new UpdatePersonData(name, age)));
app.MapGet("/person/remove/{id}", (int id) => db.RemovePerson(id));
app.MapGet("/person/friends/{id}", (int id) => db.GetFriends(id));

app.Run();
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.Urls.Add("https://localhost:5000");

InMemoryDatabase db = new InMemoryDatabase();

app.MapGet("/", () => "Hello World!");

app.MapGet("/person/fetch/{id}", (int id) => db.FetchPerson(id));
app.MapGet("/person/add/{id}/{name}/{age}", (int id, string name, string age) => db.AddPerson(id, name, age));
app.MapGet("/person/update/{id}/{name}/{age}", (int id, string name, string age) => db.UpdatePersonPut(id, new UpdatePersonData(name, age)));
app.MapGet("/person/remove/{id}", (int id) => db.RemovePerson(id));
app.MapGet("/person/friends/{id}", (int id) => db.GetFriends(id));

app.Run();
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
But like SQL in Apex
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
I've only done SQL
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
I understood the majority and I also understood what it improved
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
No no it's fine
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
I mean I do but it'd be kind of hard for me to write it myself in the near future
128 replies
CC#
Created by paun on 10/3/2024 in #help
In Memory DATABase troubles
isn't this illegal
128 replies