public async Task <IActionResult> AddTestEntityByBodyAsync ([FromBody] TestEntityDTOToCreate data) { var result = await AddTestEntityAsync(new TestEntity(data)); return(Ok(new TestEntityDTO(result))); }
public async Task <IActionResult> AddTestEntityByFormAsync ([FromForm] TestEntityDTOToCreate data) { var utcTime = data.Date.ToUniversalTime(); var result = await AddTestEntityAsync(new TestEntity(data)); return(Ok(new TestEntityDTO(result))); }
public TestEntity (TestEntityDTOToCreate data) : base() { this.Date = data.Date; }