예제 #1
0
 public async Task<int> Delete(CollegeKpi stat)
 {
     await _repository.DeleteAsync(stat);
     return _repository.SaveChanges();
 }
예제 #2
0
 public async Task<IHttpActionResult> Post(CollegeKpi stat)
 {
     if (!ModelState.IsValid) return BadRequest(ModelState);
     await _service.Post(stat);
     return Ok();
 }
예제 #3
0
 public async Task<CollegeKpi> Post(CollegeKpi stat)
 {
     var item = await _repository.InsertOrUpdateAsync(stat);
     _repository.SaveChanges();
     return item;
 }