How to save and clean a specific database if there are 2 or more data models in one database file.
previously I have created a data model as below. I have successfully loaded the data into a listView for the public class student.
Then, how do you access data from a public class school that is only input once without using a listView and PrimaryKey?
- using SQLite;
- using System;
- namespace SchoolData.Models {
- public class Student {
- [PrimaryKey, AutoIncrement] public int IdSis {
- get;
- set;
- }
- public DateTime Date {
- get;
- set;
- }
- public string PicStudent {
- get;
- set;
- }
- }
- public class School {
- public string SchoolName {
- get;
- set;
- }
- //without primary key or single entry
- public string Address {
- get;
- set;
- }
- public string Vision {
- get;
- set;
- }
- }
- }
XamlPage code overview:
- />
"{Binding SchoolName}" />- />
"{Binding Address}" />- />
"{Binding Vision}" />- Clicked="SaveClick"/>
- //save all entry
- Clicked="ClearClick"/> //clear all entry
Thank's.

yan cusPosted Jan 9, 2021, 8:25 PM
> GetAdmKelasAsync()
Amit GuptaPosted Jan 9, 2021, 2:18 PM
yan cusPosted Jan 9, 2021, 2:11 PM
Amit GuptaPosted Jan 9, 2021, 12:38 PM
yan cusPosted Jan 9, 2021, 12:15 PM
Amit GuptaPosted Jan 9, 2021, 10:30 AM