public async Task AddSection_AddsToDb() { // Act var lResult = await sectionRepository.Add(new Entities.SectionEntity { SalonYear = EntitiesHelper.GetSalonYear(), SectionType = EntitiesHelper.GetSectionType() }); // Assert Assert.IsTrue(lResult.Id > 0); var lCreatedEntity = await sectionRepository.GetById(lResult.Id); Assert.IsNotNull(lCreatedEntity); Assert.IsTrue(lCreatedEntity.Id > 0); }
public Section GetSectionById(int sectionId) { return(sectionRepository.GetById(sectionId)); }