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

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