private void View_OnAddPost(object sender, EventArgs e) { if (View.PostToAdd == string.Empty) { return; } if (_postRepository.AnyPostByPostName(View.PostToAdd)) { return; } var postToAdd = new Post() { Name = View.PostToAdd }; _postRepository.Add(postToAdd); }