private static BLL.Suggest publish(string title, string body, User author) { SuggestReporsitory suggestReporsitory = new SuggestReporsitory(Helper.Context); BLL.Suggest suggest = new BLL.Suggest { Title = title, Body = body, Author = author }; suggestReporsitory.Save(suggest); BLL.Message message = new BLL.Message { PublishTime = DateTime.Now, Owner = author }; MessageReporsitory messageReporsitory = new MessageReporsitory(Helper.Context); messageReporsitory.Save(message); return(suggest); }
//public MYUser User { get; set; } public void Publish(Suggest suggest) { _suggestRepoistory.Save(suggest); }