public async Task <bool> Delete(ConsultingService ConsultingService) { if (await ValidateId(ConsultingService)) { } return(ConsultingService.IsValidated); }
public Store_ConsultingServiceDTO(ConsultingService ConsultingService) { this.Id = ConsultingService.Id; this.Name = ConsultingService.Name; this.Errors = ConsultingService.Errors; }
public async Task <ConsultingService> Get(long Id) { ConsultingService ConsultingService = await UOW.ConsultingServiceRepository.Get(Id); if (ConsultingService == null) { return(null); } return(ConsultingService); }
public async Task <ConsultingService> Get(long Id) { ConsultingService ConsultingService = await DataContext.ConsultingService.AsNoTracking() .Where(x => x.Id == Id) .Select(x => new ConsultingService() { Id = x.Id, Code = x.Code, Name = x.Name, }).FirstOrDefaultAsync(); if (ConsultingService == null) { return(null); } return(ConsultingService); }
public async Task <bool> ValidateId(ConsultingService ConsultingService) { ConsultingServiceFilter ConsultingServiceFilter = new ConsultingServiceFilter { Skip = 0, Take = 10, Id = new IdFilter { Equal = ConsultingService.Id }, Selects = ConsultingServiceSelect.Id }; int count = await UOW.ConsultingServiceRepository.Count(ConsultingServiceFilter); if (count == 0) { ConsultingService.AddError(nameof(ConsultingServiceValidator), nameof(ConsultingService.Id), ErrorCode.IdNotExisted); } return(count == 1); }
public ConsultingController() { ConsultingService = new ConsultingService(new LawyersEntities()); }
public Store_StoreConsultingServiceMappingDTO(StoreConsultingServiceMapping StoreConsultingServiceMapping) { this.StoreId = StoreConsultingServiceMapping.StoreId; this.ConsultingServiceId = StoreConsultingServiceMapping.ConsultingServiceId; this.ConsultingService = StoreConsultingServiceMapping.ConsultingService; }
public async Task <bool> Create(ConsultingService ConsultingService) { return(ConsultingService.IsValidated); }