public async Task UpdateSectionType(SectionTypeDto pSectionType) { SectionTypeEntity lSectionTypeEntity = await this._sectionTypeRepository.GetById(pSectionType.Id); Mapping.Mapper.Map <SectionTypeDto, SectionTypeEntity>(pSectionType, lSectionTypeEntity); await this._sectionTypeRepository.Update(lSectionTypeEntity); }
public async Task <SectionTypeEntity> Add(SectionTypeEntity pEntity) { await this.dbContext.SectionTypes.AddAsync(pEntity); await this.dbContext.SaveChangesAsync(); return(pEntity); }
public async Task Delete(SectionTypeEntity pEntity) { this.dbContext.SectionTypes.Remove(pEntity); await this.dbContext.SaveChangesAsync(); }
public async Task Update(SectionTypeEntity pEntity) { this.dbContext.SectionTypes.Update(pEntity); await this.dbContext.SaveChangesAsync(); }
public async Task <SectionTypeDto> GetSectionTypeById(int id) { SectionTypeEntity lSectionTypeEntity = await this._sectionTypeRepository.GetById(id); return(Mapping.Mapper.Map <SectionTypeDto>(lSectionTypeEntity)); }