Damage's Profile User Rating: -----

Reputation: 77 Whiz
Group:
Contributor w/DIC++
Active Posts:
1,330 (0.53 per day)
Joined:
05-June 08
Profile Views:
12,816
Last Active:
User is offline Apr 23 2015 09:04 PM
Currently:
Offline

Previous Fields

Country:
NZ
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
75

Latest Visitors

Icon   Damage has not set their status

Posts I've Made

  1. In Topic: Spring - Summer 2015 Fitness

    Posted 22 Apr 2015

    300 meters of lunges with a 30kg bar yesterday has left me feeling like i spent last night getting my left ass cheek getting paddled by a midget in heels
  2. In Topic: Delete Method not working

    Posted 19 Apr 2015

    do you know how to use debugging? Can you put a breakpoint on your code (say here: string sqlStmt) and then step into the code to see what values are being assigned?
  3. In Topic: Delete Method not working

    Posted 19 Apr 2015

    Hah, edited while i wrote that. Access is the devil

    I think you've made a typo

    AND" + 
    "FirstName = @first AND " +
    
    
    


    Theres a space missing after your first AND

    AND " + 
    "FirstName = @first AND " +
    
    
    
  4. In Topic: EF defining a required to optional relationship (using Code First)

    Posted 15 Apr 2015

    bit more detail

    Base

    using System;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using TCCIntegration.Framework.Interfaces.Domain;
    
    namespace TCCIntegration.DataAccess.CF.DomainModels
    {
        public abstract class EntityBase : TrackableEntity,IEntity
        {
            [Key]
            [Column(Order = 0)]
            [DatabaseGenerated(DatabaseGeneratedOption.None)]
            public Guid Id { get; set; }
        }
    }
    
    
    


    Model

    using System;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    
    namespace TCCIntegration.DataAccess.CF.DomainModels
    {
       public class TCC_IntegrationExceptions : EntityBase
        {
            
    
           [Key]
           [Required]
           [Column(Order = 0)]
           [ForeignKey("TCC_TransactionHistory")]
           public virtual TCC_TransactionHistory TCC_TransactionHistory { get; set; }
    
           [Required]
            public string ExceptionMsg { get; set; }
    
            public string ProgramCodeMethod { get; set; }
            public int ProgramCodeLineNumber { get; set; }
            public string StackTrace { get; set; }
            
        }
    }
    
    


    /*****EDIT***/
    the naming conventions a bit deceiving , i have another archiveclass (the one thats in the example) that inherits everything from the model above

    using TCCIntegration.DataAccess.CF.DomainModels;
    using TCCIntegration.Framework;
    
    
    namespace TCCIntegration.DataAccess.CF.Archive.ArchivedIntegrationDomainModels
    {
        public class TCC_ArchivedIntegrationExceptions : TCC_IntegrationExceptions
        {
        
        }
    }
    
    


    so as you can see, the primary key ID resides in the base class, and when using fluent to define the relationship, it doesn't know anything about it
  5. In Topic: Cascading deletes in Entity Framework Code First

    Posted 15 Apr 2015

    Sorry, CF as in Code First (entity frameworks)

    Thanks for the link

    So if i'm reading that correctly

    i apply the cascade to my parent table(in my case parents)

    TrafficLog and TransactionHistory

    so a delete from trafficlog will flow to transactionhistory, which will trigger the cascade to OutgoingService and Exceptions.

My Information

Member Title:
Lord of Schwing
Age:
32 years old
Birthday:
February 1, 1983
Gender:
Location:
I live in the great state of Denial but i often visit the neighbouring state of Hysteria
Programming Languages:
Learning: Java,Javascript,C#,HTML,SQL

Contact Information

E-mail:
Click here to e-mail me
Website URL:
Website URL  http://
Twitter:
LordSchwing

Friends

Comments

Damage has no profile comments yet. Why not say hello?