1234567891011121314151617181920212223242526272829303132333435363738 |
- 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<List<School>> FindSchoolInfo(Dictionary<string, object> code)
- {
-
- return await _cosmosrepository.FindByParams<School>(code);
- }
- public async Task<School> SaveToCosmosDB(School system)
- {
- await _cosmosrepository.Save(system);
- return system;
-
- }
- public async Task<School> UpdateSchool(School system)
- {
- await _cosmosrepository.ReplaceObject(system, system.Id,system.Code);
- return system;
- }
- }
- }
|