async public Task <Song> Update([FromRoute] int id, [FromBody] ModelSong model) { var ret = await _fsql.Update <Song>().SetSource(new Song { Id = id, Title = model.title }).ExecuteUpdatedAsync(); return(ret.FirstOrDefault()); }
async public Task <Song> Create([FromBody] ModelSong model) { var ret = await _fsql.Insert <Song>().AppendData(new Song { Title = model.title }).ExecuteInsertedAsync(); return(ret.FirstOrDefault()); }
public Task Update([FromRoute] int id, [FromBody] ModelSong model) { return(_songRepository.UpdateAsync(new Song { Id = id, Title = model.title })); }
public Task <Song> Create([FromBody] ModelSong model) { return(_songRepository.InsertAsync(new Song { Title = model.title })); }