public string GetKey(TDTO dto) { return(PropertyHelper.Get <string>(dto, typeof(DynamoDBHashKeyAttribute))); }
public async Task <IActionResult> Post([FromBody] TModel resourceViewModel) { var sdo = Mapper.Map <TSDO>(source: resourceViewModel); var response = await _service.Create(sdo : sdo); var singleResource = Mapper.Map <TModel>(source: response.Item); return(CreatedAtAction(actionName: nameof(Get), routeValues: new { resourceKey = PropertyHelper.Get <Guid>(obj: singleResource, attributeType: typeof(ResourceKeyAttribute)) }, value: singleResource)); }