예제 #1
0
 public void AddIncome(IncomeModel model)
 {
     using (var repository = repositoryFactory.Create <Income>())
     {
         repository.Insert(mapper.Map <Income>(model));
     }
 }
예제 #2
0
 public void EditIncome(IncomeModel model)
 {
     using (var repository = repositoryFactory.Create <Income>())
     {
         var income = repository.Get(model.Id);
         repository.Update(mapper.Map(model, income));
     }
 }
예제 #3
0
 public void Put([FromBody] IncomeModel model)
 {
     service.EditIncome(model);
 }
예제 #4
0
 public void Post([FromBody] IncomeModel model)
 {
     service.AddIncome(model);
 }