Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
AnswerRe: Terminated due to timeout.. Working properly with small input like 100 but not with large example 10000 Pin
BillWoodruff3-Feb-15 21:04
professionalBillWoodruff3-Feb-15 21:04 
QuestionSHDocVw.dll access denied system.dynamic.dll Pin
Digriz773-Feb-15 12:51
Digriz773-Feb-15 12:51 
AnswerRe: SHDocVw.dll access denied system.dynamic.dll Pin
Bernhard Hiller5-Feb-15 7:54
Bernhard Hiller5-Feb-15 7:54 
GeneralRe: SHDocVw.dll access denied system.dynamic.dll Pin
Digriz775-Feb-15 14:26
Digriz775-Feb-15 14:26 
GeneralRe: SHDocVw.dll access denied system.dynamic.dll Pin
DelphiCoder5-Feb-15 20:44
DelphiCoder5-Feb-15 20:44 
QuestionHow to add foregin key in code firest Pin
Member 114240953-Feb-15 5:28
Member 114240953-Feb-15 5:28 
AnswerRe: How to add foregin key in code firest Pin
Simon_Whale3-Feb-15 5:46
Simon_Whale3-Feb-15 5:46 
GeneralRe: How to add foregin key in code firest Pin
Member 114240953-Feb-15 5:56
Member 114240953-Feb-15 5:56 
I have five classes :
1.post :parent
2. and 3 sub class :article,news.advertisement
3.tags
.
How can I craate relation between 3 sub class and Tags.
each class :article ,news,advertisement has 0 or many tags .
please help me.

my code is:
C#
 public abstract  class Post
    {
      
      
        protected string Title { get; set; }
      
        protected string Content { get; set; }
        protected DateTime AddDate { get; set; }
        protected bool IsReady { get; set; }
        public virtual Member Member { get; set; }
        [ForeignKey("Member")]
        public int MemberID { get; set; }
        [DefaultValue(0)]
        public int Views { get; set; }
        public ICollection<Tag> Tags { get; set; }
        public ICollection<Comment> Comments { get; set; }
}
public class Article:Post
    {
       [Key]
        public int ArticleId { get; set; }
       public IList<Tag> Tags { get; set; }
    }
 public sealed class Tag
    {
       [Key]
        public int TagId { get; set; }
        public string Value { get; set; }
     
        

    }
public class News : Post
    {
       [Key]
        public int NewsId { get; set; }
       public IList<Tag> Tags { get; set; }
    }


modified 3-Feb-15 12:05pm.

QuestionUsing strings from external .txt file Pin
Tetra10443-Feb-15 3:47
Tetra10443-Feb-15 3:47 
AnswerRe: Using strings from external .txt file Pin
OriginalGriff3-Feb-15 4:04
mveOriginalGriff3-Feb-15 4:04 
GeneralRe: Using strings from external .txt file Pin
Tetra10443-Feb-15 4:20
Tetra10443-Feb-15 4:20 
GeneralRe: Using strings from external .txt file Pin
OriginalGriff3-Feb-15 4:30
mveOriginalGriff3-Feb-15 4:30 
GeneralRe: Using strings from external .txt file Pin
Tetra10443-Feb-15 4:41
Tetra10443-Feb-15 4:41 
AnswerRe: Using strings from external .txt file Pin
BillWoodruff4-Feb-15 6:21
professionalBillWoodruff4-Feb-15 6:21 
GeneralRe: Using strings from external .txt file Pin
Tetra10445-Feb-15 3:06
Tetra10445-Feb-15 3:06 
QuestionHow to share a server connection between different powershell runspaces in c# on a web application Pin
tasoss2-Feb-15 21:37
tasoss2-Feb-15 21:37 
QuestionRe: How to share a server connection between different powershell runspaces in c# on a web application Pin
Richard MacCutchan3-Feb-15 0:38
mveRichard MacCutchan3-Feb-15 0:38 
AnswerRe: How to share a server connection between different powershell runspaces in c# on a web application Pin
tasoss3-Feb-15 0:59
tasoss3-Feb-15 0:59 
SuggestionReceiving Windows Message in class library asynchronously in C# Pin
Ram Kumar2-Feb-15 18:07
Ram Kumar2-Feb-15 18:07 
GeneralRe: Receiving Windows Message in class library asynchronously in C# Pin
Richard Deeming4-Feb-15 1:53
mveRichard Deeming4-Feb-15 1:53 
QuestionStruct and Enum Pin
Member 111616252-Feb-15 18:05
Member 111616252-Feb-15 18:05 
AnswerRe: Struct and Enum Pin
OriginalGriff2-Feb-15 21:13
mveOriginalGriff2-Feb-15 21:13 
AnswerRe: Struct and Enum Pin
BillWoodruff3-Feb-15 21:01
professionalBillWoodruff3-Feb-15 21:01 
AnswerRe: Struct and Enum Pin
V.3-Feb-15 22:02
professionalV.3-Feb-15 22:02 
Questionhow do I change a regex Pin
Member 113543862-Feb-15 11:55
Member 113543862-Feb-15 11:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.