public static async Task <bool> SubmitComment(BlogCommentModel comment) { if (comment.Subscribe) { await AddSubscriber(comment.Email); } return(await JsnoRepo.SubmitComment(BlogCommentModel.MapToDto(comment))); }
public static async Task <bool> SubmitContactRequest(ContactModel contactRequest) { if (RegexUtilities.IsValidEmail(contactRequest.Email)) { await EmailService.NotifySnover(contactRequest); return(await JsnoRepo.SubmitContactRequest(ContactModel.MapToDto(contactRequest))); } return(false); }
public static async Task <bool> AddSubscriber(string email) { await EmailService.NotifySnover(email); return(await JsnoRepo.AddSubscriber(email)); }
public static async Task <bool> SubmitBlog(BlogEditModel blog) { return(await JsnoRepo.UpdateBlog(BlogEditModel.MapToDto(blog))); }
public static async Task <bool> SubmitBlog(NewBlogModel blog) { return(await JsnoRepo.SubmitBlog(NewBlogModel.MapToDto(blog))); }