public void Save() { if (Size != null && Size != string.Empty) { SizeModel sm = new SizeModel() { Size = this.Size, }; sm = sm.SaveThis(); MessageBox.Show("Size Created", "Success", MessageBoxButton.OK, MessageBoxImage.Information); } else { MessageBox.Show("Empty Size", "Failed", MessageBoxButton.OK, MessageBoxImage.Error); } }