Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
498 B
8
Indexable
Never
//This code will be placed on your model file
//Replace all necessary fields aligned on your existing database.
//This will be placed on your Student.cs model


public async Task<List<Schools>> GetSchools()
{
    return (await client
        .Child("Schools")
        .OnceAsync<Schools>()).Select(item => new Schools
        {
            SchoolID = item.Object.SchoolID,
            SchoolName = item.Object.SchoolName,
            SchoolAddress = item.Object.SchoolAddress
        }).ToList();
}
Leave a Comment