public void InsertMessage(Mensahe Message, TagIya User) { try { context.SPI_BuhatUgMensahe(Message.Message, User.UserId); } catch { throw; } }
private PostsModels GetPostsModel(TagIya tagIya, Mensahe msg) { MensaheRepository mr = new MensaheRepository(); PostsModels post = new PostsModels(); post.DisplayName = tagIya.ScreenName; post.Message = msg.Message; post.Comments = CommentsModels.ParseComments(msg.Kumentaryos.ToList()); post.DatePosted = msg.DatePosted; post.NumberOfVotes = mr.GetMessageVotes(msg.MessageId); post.PostUserId = tagIya.UserId; post.MessageId = msg.MessageId; if (string.IsNullOrEmpty(tagIya.Gravatar)) post.Gravatar = Utility.GetMD5Hash(PostHelper.GetRandomString(10) + "@no-email.com"); else post.Gravatar = Utility.GetMD5Hash(tagIya.Gravatar); return post; }
public void CreatePost() { MensaheRepository mr = new MensaheRepository(); TagIyaRepository tir = new TagIyaRepository(); try { Mensahe msg = new Mensahe(); msg.Message = this.Message; msg.DatePosted = DateTime.Now; msg.DateEdited = DateTime.Now; mr.InsertMessage(msg, tir.GetTagIya(this.PostUserId)); } catch { throw; } }
private PostsModels GetPostsModel(TagIya tagIya, Mensahe msg) { MensaheRepository mr = new MensaheRepository(); PostsModels post = new PostsModels(); post.DisplayName = tagIya.ScreenName; post.Message = msg.Message; post.Comments = CommentsModels.ParseComments(msg.Kumentaryos.ToList()); post.DatePosted = msg.DatePosted; post.NumberOfVotes = mr.GetMessageVotes(msg.MessageId); post.PostUserId = tagIya.UserId; post.MessageId = msg.MessageId; if (string.IsNullOrEmpty(tagIya.Gravatar)) { post.Gravatar = Utility.GetMD5Hash(PostHelper.GetRandomString(10) + "@no-email.com"); } else { post.Gravatar = Utility.GetMD5Hash(tagIya.Gravatar); } return(post); }
public void InsertMessage(Mensahe Message, TagIya User) { try { context.SPI_BuhatUgMensahe(Message.Message, User.UserId); } catch { throw; } }
public void CreatePost() { MensaheRepository mr = new MensaheRepository(); TagIyaRepository tir = new TagIyaRepository(); try { Mensahe msg = new Mensahe(); msg.Message = this.Message; msg.DatePosted = DateTime.Now; msg.DateEdited = DateTime.Now; mr.InsertMessage(msg, tir.GetTagIya(this.PostUserId)); } catch { throw; } }