kilyion
kilyion
CC#
Created by kilyion on 2/16/2023 in #help
❔ Some advices about hosting API asp.net
Hello, I have a question but it's not about some code, it's more about how my system. should work So, I have to do a mobile app for my internship and this app will interrogate a sql server database. In order to do that : - I created the app with navigation and functions but not linked to the DB (on PC and tested on android emulator visual studio) - I created the sql server DB ( on PC with Db and her tables) - i created the WEB API to fetch the query of the app and manage the data of my DB (on PC with all CRUD ops) everything works fine (just done the select query but its ok) Now come the part of the hosting, I've published my WEB API on a folder in my desktop, with a console app I can call the api to fetch the response of a select query so should I move to an other froms of hosting ? Cause I have 0 experiences on this so I'm a little lost and thought about leaving it like this cause it's working
3 replies
CC#
Created by kilyion on 2/14/2023 in #help
❔ CRUD API ASP.Net
Does anyone has a good tutorial to create a restful API to do crud ops on a SQL Server ? Went to Microsoft Learn but wasn't this helpful I managed to create the API and the different HTTP request (get, post, put, delete) but doesn't know or manage to create the connection between my SQL server db and my API
3 replies
CC#
Created by kilyion on 2/9/2023 in #help
❔ Pictures Folder in android Maui
I found out how to fetch the path of the Pictures Folder in the Files app of my devices (here an Android tablet with Android 12.1 and API 32) And now I'm trying to create a folder called "MyApp" in Pictures where all the pictures taken from my project app will be stored. Here's a sample of my work :
1 - var picturesDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyPictures);
2 - var newDirectory = Path.Combine(picturesDirectory, "MyApp");
3 - Directory.CreateDirectory(newDirectory);
4 - await DisplayAlert("Alert", picturesDirectory + Environment.NewLine + newDirectory , "OK");
1 - var picturesDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyPictures);
2 - var newDirectory = Path.Combine(picturesDirectory, "MyApp");
3 - Directory.CreateDirectory(newDirectory);
4 - await DisplayAlert("Alert", picturesDirectory + Environment.NewLine + newDirectory , "OK");
1 - I'm fetching the path of the Pictures Folder 2 - I combine the path retrieved with the name of the folder i want to create into a new path 3 - With this new path i create a new Directory 4 - I'm just checking if the two directory that I use have the same beginning The sample code is from a void and when I trigger it with a button click it does the steps 1, 2 and 4 but not 3 The problem is that my folder "MyApp" is not created in the Files App of my devices
2 replies