public ValidationResult SaveTweet(Model.Tweet _tweetModel, int userId, out string _ValidationMessage) { ValidationResult _validationResult = new ValidationResult(); _ValidationMessage = string.Empty; TwitterClone_DAL.Tweet _tweet; try { _tweet = new TwitterClone_DAL.Tweet { user_id = _tweetModel.user_id, created = _tweetModel.created, message = _tweetModel.message }; _validationResult = _twitterService.SaveTweet(_tweet, userId, out _ValidationMessage); return(_validationResult); } catch (Exception) { return(ValidationResult.failure); } finally { } }
public ValidationResult SaveTweet(Entity.Tweet _tweet, int user_id, out string _ValidationMessage) { _twitterDataAccess.SaveTweet(_tweet, user_id, out _ValidationMessage); return(ValidationResult.Sucess); }