public async Task <bool> Delete(OpportunityResultType OpportunityResultType) { if (await ValidateId(OpportunityResultType)) { } return(OpportunityResultType.IsValidated); }
public Contact_OpportunityResultTypeDTO(OpportunityResultType OpportunityResultType) { this.Id = OpportunityResultType.Id; this.Code = OpportunityResultType.Code; this.Name = OpportunityResultType.Name; this.Errors = OpportunityResultType.Errors; }
public async Task <OpportunityResultType> Get(long Id) { OpportunityResultType OpportunityResultType = await UOW.OpportunityResultTypeRepository.Get(Id); if (OpportunityResultType == null) { return(null); } return(OpportunityResultType); }
public async Task <OpportunityResultType> Get(long Id) { OpportunityResultType OpportunityResultType = await DataContext.OpportunityResultType.AsNoTracking() .Where(x => x.Id == Id) .Select(x => new OpportunityResultType() { Id = x.Id, Code = x.Code, Name = x.Name, }).FirstOrDefaultAsync(); if (OpportunityResultType == null) { return(null); } return(OpportunityResultType); }
public async Task <bool> ValidateId(OpportunityResultType OpportunityResultType) { OpportunityResultTypeFilter OpportunityResultTypeFilter = new OpportunityResultTypeFilter { Skip = 0, Take = 10, Id = new IdFilter { Equal = OpportunityResultType.Id }, Selects = OpportunityResultTypeSelect.Id }; int count = await UOW.OpportunityResultTypeRepository.Count(OpportunityResultTypeFilter); if (count == 0) { OpportunityResultType.AddError(nameof(OpportunityResultTypeValidator), nameof(OpportunityResultType.Id), ErrorCode.IdNotExisted); } return(count == 1); }
public async Task <bool> Create(OpportunityResultType OpportunityResultType) { return(OpportunityResultType.IsValidated); }