Пример #1
0
 /// <summary>
 /// Used for viewmodel to dbmodel
 /// </summary>
 private IPProcessTypeModel MappingDbModel(IPProcessTypeViewModel viewModel)
 {
     return(new IPProcessTypeModel(viewModel.Code, viewModel.ProcessType));
 }
Пример #2
0
        public Task <int> Create(IPProcessTypeViewModel model)
        {
            var mappingModel = MappingDbModel(model);

            return(_repository.InsertAsync(mappingModel));
        }
Пример #3
0
 public Task <int> Update(int id, IPProcessTypeViewModel model)
 {
     return(_repository.UpdateAsync(id,
                                    MappingDbModel(model)));
 }