Search Results

Search found 2 results on 1 pages for 'jisang yoo'.

Page 1/1 | 1 

  • EF Code First, how can I achieve two foreign keys from one table to other table?

    - by Yoo Matsuo
    I've recently downloaded Entity Framework Code First CTP5, and have a trouble with this scenario. I have two tables as follows: Members table ID Name Comments table ID Comment CommentedMemberID CommentMemberID And, the data should be like the following: Members ID Name 1 Mike 2 John 3 Tom Comments ID Comment CommentedMemberID CommentMemberID 1 Good 1 2 2 Good 1 3 3 Bad 2 1 Then, I coded as shown below: public class Member { public int ID {get; set; } public string Name { get; set;} public virtual ICollection Comments { get; set;} } public class Comment { public int ID { get; set; } public string Comment { get; set; } public int CommentedMemberID { get; set; } public int CommentMemberID{ get; set; } public virtual Member CommentedMember { get; set; } public virtual Member CommentMember { get; set; } } public class TestContext : DbContext { public DbSet Members { get; set; } public DbSet Comments { get; set; } } But when I run these models on my cshtml, it gives me errors saying "Cannot create CommentMember instance" or something like that (Sorry, I already changed my models to proceed the EF Code First evaluation, so can't reproduce the same error). I've also tried to use OnModelCreating on the TestContext, but can't find any good instructions and don't know what to do. I saw a blog post of the EF Code First CTP3, and it seems there was a RelatedTo attribute in that version, but now it has gone. Could anyone know how to get it work properly? Or is this a totally wrong way to go with this scenario? Thanks, Yoo

    Read the article

  • where to download emacs manuals as offline html files

    - by Jisang Yoo
    When you press C-h i in Emacs, it shows what's called the top of the INFO tree, and it links to all kinds of manuals: AUCTeX, Org Mode, Emacs, Emacs FAQ, Emacs Lisp Intro, Elisp, ... . Is there a place where I can download all of them at once as html files? GNU Home page has links to some of them in html format: http://www.gnu.org/software/emacs/manual/elisp.html_node.tar.gz http://www.gnu.org/software/emacs/manual/emacs.html_node.tar.gz But I cannot find a link to a single tar.gz file packing all of them.

    Read the article

1