コード例 #1
0
 public AppUser(Guid id)
 {
     using (var db = new SupenEntities())
     {
         var repos   = new AppUserRepos();
         var getUser = repos.GetAppUser(id);
         AppUserId = id;
     }
 }
コード例 #2
0
ファイル: BloggRepos.cs プロジェクト: marcusbatan/Supen2
 public bool CreateBlogPost(string text, string category, Guid id)
 {
     using (var db = new SupenEntities())
     {
         var repos = new AppUserRepos();
         var bp    = new Blogg();
         bp.BloggId   = Guid.NewGuid();
         bp.Category  = category;
         bp.Text      = text;
         bp.AppUserId = id;
         db.Blogg.Add(bp);
         db.SaveChanges();
     }
     return(true);
 }