public Style CreateStyle(string name, string color, string glass) { if(string.IsNullOrEmpty(name)) throw new ArgumentNullException("name"); if(string.IsNullOrEmpty(color)) throw new ArgumentNullException("color"); if(string.IsNullOrEmpty(glass)) throw new ArgumentNullException("glass"); var id = _styleRepository.NextIdentity(); var style = new Style(id, name); style.Color = color; style.Glass = glass; _styleRepository.Add(style); return style; }
public void Save(Style style) { _styleRepository.Update(style); }