using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; using TEAMModelOS.Model.BaseInfo.Models; using TEAMModelOS.SDK.Module.AzureCosmosDB.Interfaces; using TEAMModelOS.Service.Core.Interfaces; namespace TEAMModelOS.Service.Core.Implements { public class SchoolSystemService : BaseService, ISchoolSystemService { public IAzureCosmosDBRepository _cosmosrepository; public SchoolSystemService(IAzureCosmosDBRepository cosmosDBRepository) { _cosmosrepository = cosmosDBRepository; } public async Task> FindSchoolInfo(Dictionary code) { return await _cosmosrepository.FindByParams(code); } public async Task SaveToCosmosDB(School system) { await _cosmosrepository.Save(system); return system; } public async Task UpdateSchool(School system) { await _cosmosrepository.ReplaceObject(system, system.Id,system.Code); return system; } } }