Тёмный

How to Add a Database to Xamarin & .NET MAUI apps with SQLite-net 

James Montemagno
Подписаться 139 тыс.
Просмотров 77 тыс.
50% 1

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 200   
@samosimo9279
@samosimo9279 3 года назад
Nice video but we need tutorial of sync local database and database "sync sqlite and mysql" with xamarin forms
@AMIRKHAN-dm2fm
@AMIRKHAN-dm2fm 3 года назад
Thank you so much but if we want to make offline and online sync with local sqlite database then how we can achieve that?
@AMIRKHAN-dm2fm
@AMIRKHAN-dm2fm 3 года назад
@@codigoadictivo Thanks
@yasminaamroun8682
@yasminaamroun8682 Год назад
can you give us an example of a database with several tables?
@betteaage8845
@betteaage8845 3 года назад
For those wondering why the "id" at 20:10 is 1 when it should be 2, it is because it is not the id that is returned - it is the number of rows affected, which is 1.
@JamesMontemagno
@JamesMontemagno 3 года назад
Yup, I realized that after I recorded :)
@chrisjlocke
@chrisjlocke 3 года назад
Oops, just commented on that. Good spot.
@cristisandu678
@cristisandu678 3 года назад
Wow, you can make a integration with a Azure DB ? I have 150$ on Azure monthly and I try to use it in a application but documentation is a little bit too complicated. Thank you very much! You are a legend 🎉
@Catsmeat2
@Catsmeat2 3 года назад
Second this!
@Yevke
@Yevke 3 года назад
Great Video, but can you maybe answer me here or in private, where can I find the DB file on my PC/Andorid? I was trying to open it up and to see if my users that registered are saved on DB but I just can't find the file, I was using DB Browser (SQLite).
@jeremybray8050
@jeremybray8050 Год назад
I'm having a rather strange issue. When I go to do something like CreateTableAsync, my app freezes. Debugging in VS2022 kind of goes crazy in that if I am stepping through the code and hit that line, I can no longer continue or keep stepping or anything. Any suggestions?
@synergy.2899
@synergy.2899 Год назад
I am also having this issue, did you ever figure it out?
@jeremybray8050
@jeremybray8050 Год назад
@@synergy.2899 I don't think I did. I ended up ditching SQLite for my project and just storing the data that I need in a JSON file since I'm not trying to store so much that SQL makes more sense anyway.
@synergy.2899
@synergy.2899 Год назад
@@jeremybray8050 I was contemplating on doing the same thing as well. Its a shame because SQLite seems so nice but it doesnt seem like a lot of people had the same issue as us. Were you working with MAUI Blazor?
@MehStang
@MehStang 3 года назад
Awesome video! Can you also show how to now change databases using mvvm and similar services? Maybe discuss more on attributes? I was watching a mongodb c# video and attributes were used everywhere. (Maybe discuss entity framework) I love also how you are maintaining mvvm! I’m jumping into xamarin and your videos along with your other Best friends in the entire world have been illuminating!
@jalemanyr
@jalemanyr 6 месяцев назад
Great tutorial, One question, why need to add a Delay(2000) in the refresh? thanks
@JamesMontemagno
@JamesMontemagno 6 месяцев назад
Was just an example to show the refresh ui as it is so fast. No needed at all except debugging
@kennethguerrero1591
@kennethguerrero1591 3 года назад
Great video as always! Please make one using online db - Azure Table Storage and Functions.
@gregorymoore2877
@gregorymoore2877 2 года назад
I would interested in this too.
@radoslavatanasov8846
@radoslavatanasov8846 3 года назад
James so much thanks about your videos you help us a lot! I have a suggestion, can you do a second part of some of your lessons with things for advanced. Here, for example, you can make an advanced video to show how to create a database with a script, how to update the tables with a script and some more complex queries.
@Hunt4iSW
@Hunt4iSW 11 месяцев назад
Hey James great series so far that I've watched! I am having a nasty problem right now however. As i attempt to refresh and repopulate my items with the objects retrieved from the Sqlite database, the query itself will crash the app with a fatal signal 11. Everything in the DatabaseService class is copied from you apart from my own object class being used instead of your Coffee. I've been trying to figure out what's wrong with the database to no avail. What could cause this?
@blinkskaterkc
@blinkskaterkc 3 года назад
Extremely helpful video, thank you. I have some reworking to do :)
@techman2030
@techman2030 9 месяцев назад
Great video! It follow the docs I have been reading on using SQLite with MAUI. However, can you provide guidenace on howto use an existing databese with the project ratrher than creating a database from scratch from code. I already have a database I want to use. Thanks in advnace.
@mikejaylabustro5947
@mikejaylabustro5947 3 года назад
Hello James, hope you can make more tutorials in SQLite CRUD. How to insert image in bytes and image file path. How to locate and manage the SQLite database using browser. If it is possible to retain your existing local SQLite database once the app has been reinstalled.
@boysen01
@boysen01 3 года назад
hey James, great video thanks for putting it out there. You did not mention the reason for the Task.Delay(2000) call in the Refresh() method. What is the benefit of having that call in there? Or, what would happen if there was no forced delay ?
@JamesMontemagno
@JamesMontemagno 3 года назад
Just to show the spinner in the UI since it is instant return. You should not do this in production.
@boysen01
@boysen01 3 года назад
@@JamesMontemagno ok thanks good to know
@davidjackson148
@davidjackson148 2 года назад
Does your CoffeeService have to be s "static" class? I have a dynamic class (that gets injected) with a static DB instance (I couldn't figure out how to DI it, I kept getting errors). But now to a Windows target, it works fine but to an Android target I get SQLiteException, have you seen this behaviour before? Its a Xamarn App that was working fine, that I'm trying to move to MAUI.
@oroke24
@oroke24 10 месяцев назад
Error: Found conflicts between versions of “System.Numerics.Vectors”.. I have no idea 😑
@MikeKm-hd1ve
@MikeKm-hd1ve 8 месяцев назад
First of all, Thank you for the great video! Btw, Am I the only one getting SQLite connection exception in the Init() function? I copied the code from the documentation. Can anybody tell me what can be the problem?
@davidjackson148
@davidjackson148 2 года назад
Can you do a MAUI specific example please :)
@kuskanali
@kuskanali 2 года назад
Hi. Net.maui application connect with local or remote server (mssql,mysql,postgresql) connect success on windows, macos and ios but android , it is not successfull. Please remote server connect with net.maui example video. Thanks.
@ohwmohammed
@ohwmohammed 2 года назад
Hi how can I deal with sql server by xamarin using Entity Framework Core Or which ORM to use with sql server in xamarin
@aggies9296
@aggies9296 3 года назад
Thanks James! Awesome video~ Can you show how to use NOSQL database with Xamarin?
@danmanning6759
@danmanning6759 3 года назад
Thanks for creating this video, great walkthough! Question though, I've always thought that it was bad practice to create 1 db connection and leave it open, especially in Xamarin where the app can be backgrounded etc. Is that still true, or am I mixing up sqlite-net and entity framework?
@mozilla9112
@mozilla9112 Год назад
Thank you for this. I can;t seem to locate the MyCoffeeStoredPage on your Github though
@GuildOfCalamity
@GuildOfCalamity 2 года назад
I was hoping to follow along from the last video (trying to code it from scratch with you)... but it seems you made a bunch of changes to the app in another video? I guess this playlist is not in the correct order? Going to try and piece this together from the github.
@chaseroth9266
@chaseroth9266 3 года назад
Awesome Video! Interesting to see you using a lazy loading technique for initializing your services. In my next application I will give that approach a try. :)
@yaserpy
@yaserpy 2 года назад
how to build xamarin sqlite crud app ( with images - exp : like photo app gallery )
@drivetrainerYT
@drivetrainerYT 2 года назад
Can’t stop likes and comments, thanks James, crispy clear and helpful.
@JamesMontemagno
@JamesMontemagno 2 года назад
Much appreciated
@larslarsson2843
@larslarsson2843 2 года назад
What im i doing wrong? i get System.TypeInitializationException: 'The type initializer for 'SQLite.SQLiteConnection' threw an exception.' ?
@Brutakk
@Brutakk 3 года назад
Any recommendations on how to deploy a Xamarin app with a prepopulated SQLite database?
@JamesMontemagno
@JamesMontemagno 3 года назад
you could drop in the sqlite database and read it locally using Xamarin.Essentials from the assets folder
@starvr
@starvr 2 года назад
James, when I install the SQLite-net it downgrades the essentials and forms, is this going to be a problem?
@davidjackson148
@davidjackson148 2 года назад
My code is pretty much identical to yours the only difference is I hide my database inside a service (singleton) that gets injected
@carljohnlopez5425
@carljohnlopez5425 2 года назад
How do i pass picker to int then to service then lastly storing it to the database (ex. I want to pass picker id 1 type admin or id 2 type reguser but instead getting the type , get the id then pass it to the service and ultimately storing it to the database)
@jennifermckeithen1498
@jennifermckeithen1498 3 года назад
This is so helpful! Really appreciate that you walk us through the documentation as well. Thanks so much!
@DifferentTurn
@DifferentTurn 2 года назад
James, you're the man! Can't describe how much I appreciate absolutely amazing job you've done for Xamarin Community with a such great detailed videos. 🙃 p.s. Am I the only one who can't help himself but always shaking with head & shoulders to the rhytm of JM's intro music?😅
@EllieMarieP
@EllieMarieP Год назад
I feel you on the head shaking, can't stop myself.😅
@salvcri
@salvcri Год назад
James, great video!!! Thanks a lot! Could you do a video explaining how to use an external service to push notifications? Thank you again!!!
@juliandormon7536
@juliandormon7536 3 года назад
If anyone is getting stuck adding the SQLite file. Using the following solution (also by James) worked for me. var databasePath = Path.Combine(GetLocalFileDirectory(), "MyData.db"); db = new SQLiteAsyncConnection(databasePath); public string GetLocalFileDirectory() { var docFolder = FileSystem.AppDataDirectory var libFolder = Path.Combine(docFolder, "Databases"); if (!Directory.Exists(libFolder)) { Directory.CreateDirectory(libFolder); //
@matejlaskomulej
@matejlaskomulej 3 года назад
First time trying to store data from app into device and you made it a breeze. Been using some of your packages before, but just found this channel for the first time. Subscribed! Thank you!!
@john-blair
@john-blair 2 года назад
Why not use a static constructor for initialising the db instead of calling Init() everywhere?
@JamesMontemagno
@JamesMontemagno 2 года назад
Mostly to lazy load it and also you need to initiatlize the tables and those are async methods.
@GAMacky
@GAMacky Год назад
Thanks for yet another great video. You have shown at 21:05, when closed and relaunch the app, the coffee db still persists. I think that's because the app was still persist in the memory? because every time the app is launched, shouldn't the variable db be null? If it's null, then the db is recreated with the db.CreateTableAsync statements. Shouldn't that then wipe out what was in the db file?
@JamesMontemagno
@JamesMontemagno Год назад
Create table will only create it if it hasn’t already. The file persists on disk.
@cs_minasmins4676
@cs_minasmins4676 2 года назад
Super interesting how easy it is to create a simple db app. Thx
@JamesMontemagno
@JamesMontemagno 2 года назад
Glad it was helpful!
@snooki9
@snooki9 2 года назад
Dear James, thanks for the nice video. In the Init task that you created, you put a if db exist then don't do anything if I understand well. In this same Init task you create the table "Coffee". My question is, if tommorrw I want to ceate a new table in the same DB, let say a "CoffeeMachine" table. If I understand well i create a new "CoffeeMachineService.cs", I create an Init task in it. But what I don't understand here is, when i will put the condition if db does exist don't do anything and I'm scared it will skip the creation of the table "CoffeeMachine" (because the Init of CoffeService.cs will have been already launch before and so the db already exist). Could you explain what I don't understand if you see what it is ? :-) thanks !
@mikegrainger8082
@mikegrainger8082 3 года назад
As normal, great video. Many thanks for your efforts.
@ezzaldeen
@ezzaldeen 3 года назад
What about ef core sqlite ?
@CraxGaming
@CraxGaming 3 года назад
Can you do a navigation video?
@JamesMontemagno
@JamesMontemagno 3 года назад
It is on my list.
@CraxGaming
@CraxGaming 3 года назад
@@JamesMontemagno thanks. 🙂
@toma1385
@toma1385 2 года назад
The same way we use sqlite in blazor hybrid?
@rickfuzzy
@rickfuzzy 2 года назад
Hey James, tip for you in VS: If you press ctrl-c without selecting anything it copies the line, you can then paste the full line with the line break exactly where you want it. This seems to be fairly unknown, but saves a mountain of time for me. For example to duplicate a line just press ctrl-c and ctrl-v without selecting anything Thanks for the video.
@AustinHale
@AustinHale 2 года назад
Save yourself an additional step by using the command Ctrl+D to duplicate the current line onto the next line.
@rickfuzzy
@rickfuzzy 2 года назад
@@AustinHale yeah I saw that too recently. Thanks for the reminder
@bjrnhellesylt3922
@bjrnhellesylt3922 2 года назад
Thanks a lot for a great video. How about making a video where you connect to an MS SQL server and authenticate with IdentityUser for Maui. I have not been able to find such a video yet. After all, users are usually authenticated against an online database. Thanks in advance.
@roberthudson8908
@roberthudson8908 3 года назад
Another great video James! Thanks. A few questions... are there any significant advantages of dealing with SQLite on such a low level? I have a production app with a fairly complex data model. To store the data offline I de/serialize the entire thing using Akavache (which uses SQLite under the hood). Everything works great, no issues at all. Akavache encapsulates all the wiring of tables internally. Same with your MonkeyCache, it's also awesome too I'm starting to use it as well. Question #2 - I'm curious... why do you say MonkeyCache/Akavache et. al. are "caches" only? Why can't they be persistent data stores?
@JamesMontemagno
@JamesMontemagno 3 года назад
I don't think any significant advantages or not. I just have always saved local data in SQLite over the years so I am used to it. MonkeyCache for sure is a cache layer and isn't intended to bused as a database. You can re-direct the file save location, but I intentionally put it in cache folder by default. I mostly use it for caching web requests and small bits of data. Akavache for sure is more like database as it is a key value store, but is persistent.
@roberthudson8908
@roberthudson8908 3 года назад
@@JamesMontemagno Thank you James. That makes perfect sense. BTW, I've stuck with Xamarin Forms since 2014. I wouldn't have done so without you and your awesome contributions to this platform. I appreciate it very much,
@jhdabomb
@jhdabomb 3 года назад
Nice tutorial! How can you automatically display the data upon going into the MyCofffee page (@21:10) from the database without pulling to refresh the page?
@JamesMontemagno
@JamesMontemagno 3 года назад
Just call the method from onappearing in the page
@jhdabomb
@jhdabomb 3 года назад
@@JamesMontemagno Thanks again for the tip! Much appreciate! Is this what you're referring to? I did it like so in the page code behind. private readonly MyCoffeeViewModel _model; public MyStoredCoffeePage() { InitializeComponent(); _model = BindingContext as MyCoffeeViewModel; } protected override async void OnAppearing() { base.OnAppearing(); await _model.Refresh(); }
@JamesMontemagno
@JamesMontemagno 3 года назад
@@jhdabomb Yup, that should work
@magellan124
@magellan124 Год назад
please do mongodb or something simliar
@leonardoyanez6430
@leonardoyanez6430 2 года назад
Hi, James, very good Video, you have any video with de Maui and Firebase ? thanks very much
@btigenie
@btigenie 2 года назад
How could you use an sqlite tool to view the contents of the database either directly on the emulator or by somehow copying it to the development computer?
@JamesMontemagno
@JamesMontemagno 2 года назад
There is a nice sqlite explorer for VS and VS Code that I have used for web stuff, but you would need to see where things are stored or export the database :)
@DamagedDingo
@DamagedDingo 2 года назад
How to store this in cloud so that it data is recovered on logon?
@davidjackson148
@davidjackson148 2 года назад
Obvious question. When the app starts up again wont it recreate the database, i.e. wipe out any data that's already there ?
@JamesMontemagno
@JamesMontemagno 2 года назад
Nope, it will validate it exist and create the table only if it doesn’t exist
@kratos7ism
@kratos7ism 2 года назад
Another great video James !!!! Aren't we supposed to find a MyData.db file in the app folder ??? Because i can't find one
@xixixiaojie
@xixixiaojie 2 года назад
Hi James! Thanks a lot for this video. I have a problem with my project and I'll like to ask for help on here. I am new to Xamarin and I have a project I'm currently working on where I have to connect my Xamarin app to a serverless backend. I have a signup page where users can register and when they hit a button, it automatically sends their information to my backend. The problem I have now is : How do I collect user inputs? I'm writing the API call to collect the data but I can't seem to get how to tell my program to take whatever is in this entry field (or entry fields), and send it over here. What I did so far was to give the entry fields a name so I can access it in the code behind as "entryField.Text". I tried to declare a variable and make it "entryField.Text" but I can't access the variable in my ViewModel and it also says an "unnecessary assignment". Please what am I doing wrong and how can I collect user inputs to use in my ViewModel and API call? I hope I can get someone to give suggestions on what to do.
@catrox1000
@catrox1000 2 года назад
Awesome video like everyone! Could you create one to show us how to sync this sqliteDB with an webdav drive that the app on an other device can use the same data as well.. so like some way how to sync the entries over the different devices in that app.
@brimbon_duke
@brimbon_duke Год назад
Thank you for the video. My question is: Suppose I have already an SQLite DB that I want to use as embedded resource, how I open it instead of creating it please?
@JamesMontemagno
@JamesMontemagno Год назад
You would just point it at the file location. I would probably take the resource and then copy it locally into the apps data directory and then just set the file location and boom data
@brimbon_duke
@brimbon_duke Год назад
@@JamesMontemagno thank you for the answer. Seems simple enough. You are a hero!
@maxalmonte14
@maxalmonte14 2 года назад
Just a question, can I injection the Database manager into the Dependency service? Or is there a good reason not to do so?
@JamesMontemagno
@JamesMontemagno 2 года назад
Sure! No real reason not to
@btigenie
@btigenie 2 года назад
Design question .... is it better to open your app to mainpage and then check the database if already logged in and then redirect to a login page if not? Or, start off at the login page and check database and then redirect to mainpage if logged in?
@pjh5757
@pjh5757 3 года назад
I am using this tutorial but I have noticed that when the application is launched with data in the SQLite DB you have to refresh. I have been tinkering with this and cannot seem to find what looks like the "proper" way you would have this DB data shown without the refresh on launch.
@olcatgaming859
@olcatgaming859 3 года назад
I still can't figure this out, HELP T_T Cannot implicitly convert type 'System.Threading.Tasks.Task' to 'System.Collections.IEnumerable'.
@JamesMontemagno
@JamesMontemagno 3 года назад
Do you have a sample somewhere I can look at on GitHub?
@itaniralephata4430
@itaniralephata4430 2 года назад
Hi James. I need to develop a employee directory but I'm having issues adding the existing database to display the employees. Can you please assist. Many thanks
@JamesMontemagno
@JamesMontemagno 2 года назад
Well, not sure what format your database is in, but you could write a small desktop app to convert it into the sqlite-net format that is needed and then drop it into your mobile app and read it with docs.microsoft.com/en-us/xamarin/essentials/file-system-helpers
@itaniralephata4430
@itaniralephata4430 2 года назад
@@JamesMontemagno thank you for your response. So basically I want to attach an existing table to my Xamarin app and have a search functionality. So I just needed help on adding an existing table to my Xamarin application. Thanks in advance
@oktjona
@oktjona Год назад
How to add sql dB yo netmaui
@VirtualGrime
@VirtualGrime 3 года назад
Followed your logic most of the way James, just got stuck in two places: 1) Consider your Coffee as my Operators. Where do I declare my GetOperators? public static async TaskGetOperators() 2) Secondly, var operators = new Operators { OpName = opName, OpPhone = opPhone, OpEmail = opEmail }; opName, opPhone and opEmail identify as errors. How can i fix that?
@mikejaylabustro5947
@mikejaylabustro5947 3 года назад
Where is "MyData.db" located in solution folder using file explorer? Path.Combine(Xamarin.Essentials.FileSystem.AppDataDirectory, "MyData.db") If it's not possible, where to find it once the app is installed in actual android phone device? Thank you James!
@JamesMontemagno
@JamesMontemagno 3 года назад
You can see where it this maps to here -> github.com/xamarin/Essentials/blob/main/Xamarin.Essentials/FileSystem/FileSystem.android.cs which is inside of the app specific folder developer.android.com/training/data-storage/app-specific#internal-access-files
@AS-kw1ob
@AS-kw1ob 3 года назад
How to fill a database with data that are required in the app, and not coming from the user by using the app?
@divangerber7897
@divangerber7897 3 года назад
Ok, can you do a video on how to make use of an web API to connect a cross platform app to a SQL Server(EXPRESS) Database. Where a couple of users with their own devices can CRUD to the database from there mobile devices??
@JamesMontemagno
@JamesMontemagno 3 года назад
I have a full video on rest apis ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-a37qBMt0V9w.html
@maxmannstein
@maxmannstein 2 года назад
how to autorefresh?
@garuda4229
@garuda4229 2 года назад
Love the tutorial. I'm having one issue, when I run the refresh command I get the error System.InvalidCastException: 'Specified cast is not valid.' I can't find anywhere where a variable type or anything wouldn't match so would appreciate any ideas as to what could be causing it. Thanks!
@JamesMontemagno
@JamesMontemagno 2 года назад
Hmmm if you are able to put a sample somewhere on GitHub and then maybe open a ticket on my coffee app repo
@mathewbowden
@mathewbowden 2 года назад
James, you're are a legend mate, I missed the U in your CRUD example, I followed along nicely but not sure how to change on of the values in a record, does SQLite even allow that?
@JamesMontemagno
@JamesMontemagno 2 года назад
Oh yeah, just call updateasync github.com/praeclarum/sqlite-net
@PuineaGip
@PuineaGip 2 года назад
Hello James, I copied your code almost one to one and my app just crashes whenever I refresh can you help me?
@JamesMontemagno
@JamesMontemagno 2 года назад
If you create some gists of code samples then let me know and shoot me a dm on twitter
@PuineaGip
@PuineaGip 2 года назад
@@JamesMontemagno Ok I will! I think I am past that point now but I still have a similar issue and the app still crashes. Will dm you in a bit.
@Artur-bd3xd
@Artur-bd3xd 2 года назад
Thanks for the video, James! I have been following your tutorial and at the point were I add a coffee to the data base it doesn’t appear after the refresh, the main page is just blank, any suggestions? Thanks! (timing of the problem 19:44)
@JamesMontemagno
@JamesMontemagno 2 года назад
When you come back to the page call refresh on the view model again in on appearing
@elkhayyat85
@elkhayyat85 3 года назад
Thank you Sir for your Tutorials are helpful and easy explanation way.. Really you are a good Teacher. I have a request, can you please make a tutorial About WPF with MVVM Design to build a App like in real life when creating a project?? And sure we would like you add your touch what best ways, and framework and deal with Database.
@JamesMontemagno
@JamesMontemagno 3 года назад
I don't really do much WPF work, but it is all the same. I would look at the documentation. For database stuff look at Entity Framework Core for you desktop apps.
@abdoaly1485
@abdoaly1485 2 года назад
Dear James , I want to know if it possible to exchange data between xamarin form and desktop app. using ms-access db ... thanks in advance
@JamesMontemagno
@JamesMontemagno 2 года назад
I would assume possible if there is an api to call. Never done it. I would probably create a backend service that interfaces with your database. That is best practice
@haroldmacdonald9065
@haroldmacdonald9065 Год назад
Great video. I'm curious if you are able to do this with dependency injection? If you are able to, what are the benefits of using a static class vs using DI?
@JamesMontemagno
@JamesMontemagno Год назад
Absolutely! I would register as a singelton
@kking999
@kking999 7 месяцев назад
why you chosed sqlLite over sql server ?
@JamesMontemagno
@JamesMontemagno 7 месяцев назад
You are storing data on the device, so SQLite is your main option there. You can connec to a SQL Server via an API to pull data of course.
@divangerber7897
@divangerber7897 3 года назад
Show us your "service approach" with the database please.
@boyingsplace1945
@boyingsplace1945 Год назад
Many many thanks... very helpful for beginner like me. God bless!
@JamesMontemagno
@JamesMontemagno Год назад
Happy to help
@aleemosi
@aleemosi 2 года назад
Hello, your videos are great. Can you do an example on how to get the sum of a total from sqlite and show it in a label?
@dmitriykonopinskiy3793
@dmitriykonopinskiy3793 2 года назад
How to Save Database on the Card?
@JamesMontemagno
@JamesMontemagno 2 года назад
I assume you mean like external storage? You set the save location of the database when you create it, so you could request access and save it there.
@hidekimatsuura9061
@hidekimatsuura9061 3 года назад
How would you do full text search with fts5?
@0blit
@0blit 3 года назад
Great to see how easy this is. Would be interested to see a comparison with setup of Realm DB - and pro/con vs SQLite.
@gideonowusu9148
@gideonowusu9148 2 года назад
Thanks, this is so helpful. Please can you host the same database online instead of offline. Please can you also help me with that. Thank you
@JamesMontemagno
@JamesMontemagno 2 года назад
Take a look at my web requests video as that walk through calling web apis which would talk to your data base that is hosted online
@jakethompson5129
@jakethompson5129 3 года назад
Why doesn't it have an audio file option?
@flboy77
@flboy77 3 года назад
Great video. Have to ask as I’m coming from another dev env: wouldn’t GUID be safer than an int id when many devices are sync’ing with one centralized server?
@PeteMidg
@PeteMidg 2 года назад
Excuse my interjection but this case is internal to the device; once you have sync with azure (say) that’s when guids are most useful, but if you start with the intention to sync you should probably start with guids:-)
@matteoc7084
@matteoc7084 3 года назад
Could you please make a tutorial about Firestore ?
@MukelabaiMukelabai
@MukelabaiMukelabai 2 года назад
You made this look so simple--another mountain laid low for me!
@mojizze
@mojizze 3 года назад
I can't believe I've been sleeping on this channel. So many good contents here
@rajnikantpatel4963
@rajnikantpatel4963 3 года назад
Great video as always Want to see how to do migrations in SQLite.
@matteoc7084
@matteoc7084 3 года назад
Is it better to use sqlite or firebase ?
@JamesMontemagno
@JamesMontemagno 3 года назад
Depends on your app and if you need the features of firebase and where you want your data to live. If you have all your data in firebase then that would be fine, but if the data is anywhere else then probably not
@chrisjlocke
@chrisjlocke 3 года назад
Firebase is a big meaty DBMS isn't it? SQLite is a small library.
@moussababaousmail805
@moussababaousmail805 3 года назад
Excellent work. Thank you!
@parthathatoi8806
@parthathatoi8806 3 года назад
I'm new in XAMARIN and follow your videos and really you are awesome. I just need - is it possible to joins tables or write strored procedure or complex inline query in SQLite xamarin. I did not find such example anywhere.
@JamesMontemagno
@JamesMontemagno 3 года назад
Probably something like stackoverflow.com/questions/27260905/join-tables-in-sqlite-net-with-linq-on-xamarin-android-is-not-supported I don't think it has store procedures, it isn't a full like SQL database.
@parthathatoi8806
@parthathatoi8806 3 года назад
@@JamesMontemagno Thanks James hope healthy and safe. I'll definitely try and let you know.
@zx-xn1lb
@zx-xn1lb 3 года назад
So where's the next video.I couldn'y wait
@JamesMontemagno
@JamesMontemagno 3 года назад
My 101 series playlist is here ru-vid.com/group/PLwOF5UVsZWUiHY1CkRVjYJ6dm0iCvAlfw
@supermario867
@supermario867 3 года назад
How can I use foreign key on Sqlite-net-pcl?
@JamesMontemagno
@JamesMontemagno 3 года назад
See how it is done here - github.com/praeclarum/sqlite-net#example-time
@drossoftapps8208
@drossoftapps8208 3 года назад
Great video as usual! Regarding performance, how does SQLite-net compare to EF Core? I use EF Core in my Xamarin apps and have some performance issues (mostly on Android).
@JamesMontemagno
@JamesMontemagno 3 года назад
EF Core is not optimized for mobile solutions due to reflection so I would probably not go that route unless you are building an internal enterprise app. That said I know the team is trying to improve this scenario in and around .NET 6
@drossoftapps8208
@drossoftapps8208 3 года назад
@@JamesMontemagno Thanks for the advice!
@94089463
@94089463 3 года назад
Simple and thorough. Thanks again, James. Could you please include how to connect your Xamarin App to an API server (JSON) in your upcoming videos? I need to share data from a SQL server used in house with the outside mobile app users.
@JamesMontemagno
@JamesMontemagno 3 года назад
I have a video on making web request in the 101 series
@94089463
@94089463 3 года назад
I just found it!. Thanks again for your quick reply.
@stephanraab3648
@stephanraab3648 3 года назад
Just the video I was hoping you'd post soon!
Далее
Как открыть багажник?
00:36
Просмотров 14 тыс.
XAML for Beginners - Xamarin.Forms & .NET MAUI XAML
28:10
SQLite Databases With Python - Full Course
1:29:37
Просмотров 674 тыс.
Writing My Own Database From Scratch
42:00
Просмотров 230 тыс.