public static DAL.Tweet FromEntityToDal(TweetEntity tweet) { var dalTweet = new DAL.Tweet() { Date = tweet.DateCreation, Text = tweet.Message, }; if (tweet.Identity != null) dalTweet.Identifier = tweet.Identity; return dalTweet; }
public TweetEntity CreateTweet(TweetEntity tweet) { return FromDalToEntity(this.TweetDal.AddTweet(tweet.Message)); }