public void Write(CurrencyValue currencyObject) { var currencyValuesContext = new CurrencyValuesContext(); currencyValuesContext.CurrencyValues.Add(currencyObject); currencyValuesContext.SaveChanges(); }
public void CleanAll(string currencyName) { var currencyValuesContext = new CurrencyValuesContext(); foreach (var entity in currencyValuesContext.CurrencyValues) { currencyValuesContext.CurrencyValues.Remove(entity); } currencyValuesContext.SaveChanges(); }