public async Task <int> Create(ChannelData channel) { var newCh = db.Channels.Add(channel.MapChannelToUpdate()).Entity; await db.SaveChangesAsync(); return(newCh.Id); }
public async Task <int> Update(ChannelData channel) { db.Channels.Update(channel.MapChannelToUpdate()); return(await db.SaveChangesAsync()); }