123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Threading.Tasks;
- using TEAMModelOS.Model.Analysis.Models;
- using TEAMModelOS.SDK.Module.AzureTable.Interfaces;
- using TEAMModelOS.Service.BaseInfo.Interfaces;
- namespace TEAMModelOS.Service.BaseInfo.Implements
- {
- public class StudentsService : IStudentsService
- {
- IAzureTableDBRepository azureTableDBRepository;
- public StudentsService(IAzureTableDBRepository _azureTableDBRepository) {
- azureTableDBRepository = _azureTableDBRepository;
- }
- public async Task<Students> Delete(Students stu)
- {
- await azureTableDBRepository.Delete<Students>(stu);
- return stu;
- }
- public async Task<List<Students>> FindList(Dictionary<string, object> enlist)
- {
- List<Students> stus = await azureTableDBRepository.FindListByDict<Students>(enlist);
- return stus;
- }
- public async Task<Students> saveOrUpdate(Students stu)
- {
- //Students stu = new Students();
-
- //stu = await azureTableDBRepository.FindById<Students>(dict["id"]);
- await azureTableDBRepository.SaveOrUpdate<Students>(stu);
-
- return stu;
- }
- }
- }
|