public async Task CreateTypeOfQuestionAsync(TypeOfQuestionDTO typeOfQuestion) { var typeOFQuestionMap = Mapping.Mapper.Map <TypeOfQuestionDTO, TypeOfQuestion>(typeOfQuestion); Create(typeOFQuestionMap); await SaveAsync(); typeOfQuestion.TypeOfQuestionID = typeOFQuestionMap.TypeOfQuestionID; }
public async Task UpdateTypeOfQuestionAsync(TypeOfQuestionDTO dbTypeOfQuestion, TypeOfQuestionDTO typeOfQuestion) { dbTypeOfQuestion.TypeOfQuestionMap(typeOfQuestion); Update(Mapping.Mapper.Map <TypeOfQuestionDTO, TypeOfQuestion>(dbTypeOfQuestion)); await SaveAsync(); }
public async Task DeleteTypeOfQuestionAsync(TypeOfQuestionDTO typeOfQuestion) { Delete(Mapping.Mapper.Map <TypeOfQuestionDTO, TypeOfQuestion>(typeOfQuestion)); await SaveAsync(); }
public static void TypeOfQuestionMap(this TypeOfQuestionDTO dbTypeOfquestion, TypeOfQuestionDTO typeOfquestion) { dbTypeOfquestion.TypeName = typeOfquestion.TypeName; dbTypeOfquestion.Format = typeOfquestion.Format; }