public async Task <int> Delete(SeedType seedType) { DbSeedType temp = new DbSeedType(); _modelConverter.ConvertModelFromModel(seedType, temp); await Task.Run(() => { //Send the DbSeedType to the database or api async }); _seedTypes.Remove(seedType); return(1); }
public async Task <int> Post(SeedType seedType) { DbSeedType temp = new DbSeedType(); _modelConverter.ConvertModelFromModel(seedType, temp); await Task.Run(() => { //Put the DbSeedType to the database or api async }); seedType.Id = _seedTypes.Count + 1; _seedTypes.Add(seedType); return(1); }
public async Task <int> Put(SeedType seedType) { DbSeedType temp = new DbSeedType(); _modelConverter.ConvertModelFromModel(seedType, temp); await Task.Run(() => { //Post the DbSeedType to the database or api async }); foreach (SeedType s in _seedTypes) { if (s.Id == seedType.Id) { s.Type = seedType.Type; } } return(1); }