public void UpdateModel(Riff r) { AudioID = r.AudioID; Name = r.Name; UserID = r.UserID; DurationSeconds = r.DurationSeconds; }
public void UpdateModel(Riff a) { Name = a.Name; DateCreated = a.DateCreated; AudioID = a.AudioID; UserID = a.UserID; RiffID = a.RiffID; DurationSeconds = a.DurationSeconds; }
public RiffDTO(Riff r) { RiffID = r.RiffID; AudioID = r.AudioID; UserID = r.UserID; Name = r.Name; DateCreated = r.DateCreated; DurationSeconds = r.DurationSeconds; }
public override Riff Update(Riff obj) { using (var conn = _sqlLite.GetConnection()) { var a = conn.Find<Riff>(obj.RiffID); a.UpdateModel(obj); conn.Update(a); return a; } }
public override Riff Insert(Riff obj) { obj.DateCreated = DateTime.UtcNow; obj.RiffID = Guid.NewGuid().ToString(); using (var conn = _sqlLite.GetConnection()) { conn.Insert(obj); } return obj; }
public RiffDTO SaveRiff(string name, AudioFormat audioFormat, ChannelConfiguration channelConfiguration, int sampleRate, byte[] data, string userId) { var audio = new Audio(); audio.SetAudioFormat(audioFormat); audio.SetChannelConfiguration(channelConfiguration); audio.SampleRate = sampleRate; audio.Data = data; audio = _ar.Insert(audio); var riff = new Riff(); riff.AudioID = audio.AudioID; riff.Name = name; riff.UserID = userId; riff = _rr.Insert(riff); return new RiffDTO(riff, audio); }
public DroidRiff(Riff a) { UpdateModel(a); }
public RiffDTO(Riff r, Audio a) : this(r) { Audio = a; }