public async Task <IHttpActionResult> Post(Playlist Playlist) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.Playlists.Add(Playlist); await db.SaveChangesAsync(); return(Created(Playlist)); }
public async Task <IHttpActionResult> Post(MediaType MediaType) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.MediaTypes.Add(MediaType); await db.SaveChangesAsync(); return(Created(MediaType)); }
public async Task <IHttpActionResult> Post(Track Track) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.Tracks.Add(Track); await db.SaveChangesAsync(); return(Created(Track)); }
public async Task <IHttpActionResult> Post(Customer Customer) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.Customers.Add(Customer); await db.SaveChangesAsync(); return(Created(Customer)); }
public async Task <IHttpActionResult> Post(Album album) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.Albums.Add(album); await db.SaveChangesAsync(); return(Created(album)); }
public async Task <IHttpActionResult> Post(InvoiceLine InvoiceLine) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.InvoiceLines.Add(InvoiceLine); await db.SaveChangesAsync(); return(Created(InvoiceLine)); }