public async Task <ApiResponse <PutResult <Guid> > > Put([FromBody] ActorInputDto dto) { var key = await _actorService.Put(dto); var result = new PutResult <Guid>(key); return(ApiResponse.OK(result)); }
public async Task <int> Create(ActorInputDto inputDto) { var temp = mapper.Map <Actor>(inputDto); actorRepository.Insert(temp); await actorRepository.Save(); return(temp.Id); }
public async Task <ApiResponse <PatchResult> > Patch(string name, [FromBody] ActorInputDto dto) { var patched = await _actorService.Patch(name, dto); var result = new PatchResult(patched); if (patched <= 0) { return(ApiResponse.NotFound(Response, "actor not found", result)); } return(ApiResponse.OK(result)); }
public async Task <OutDto> GetUserInfoByActor(ActorInputDto input) { if (ActorData == null) { ActorData = await helloRepository.GetData(); } ActorData.Index++; if (ActorData.Index == 10) { ActorData.DeleteModel(); } return(await Task.FromResult(new OutDto() { Word = $"hello {input.Name},your id is {ActorData.Index}" })); }
public async Task Create(ActorInputDto inputDto) { await actorService.Create(inputDto); }