12345678910111213141516171819202122232425262728293031 |
- 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<SchoolSystem> SaveToCosmosDB(SchoolSystem system)
- {
- await _cosmosrepository.Save(system);
- return system;
-
- }
- public async Task<SchoolSystem> UpdateSchool(SchoolSystem system)
- {
- await _cosmosrepository.ReplaceObject(system, system.Id,system.Code);
- return system;
- }
- }
- }
|