Exemplo n.º 1
0
        OneToOnePart <TOther> HasOne <TOther>(Member member)
        {
            //PROTOTYPE1: ADDED
            var part = providers.OneToOnes.OfType <OneToOnePart <TOther> >().FirstOrDefault(p => p.Property.Name == member.Name);

            if (part == null)
            {
                //PROTOTYPE1: ADDED

                OnMemberMapped(member);

                part = new OneToOnePart <TOther>(EntityType, member);

                //PROTOTYPE1: ADDED
                if (this.UseBackingField(member.Name))
                {
                    part.Access.CamelCaseField(Prefix.Underscore);
                }
                //PROTOTYPE1: ADDED

                providers.OneToOnes.Add(part);

                //PROTOTYPE1: ADDED
            }
            //PROTOTYPE1: ADDED
            return(part);
        }
Exemplo n.º 2
0
        private OneToOnePart <TOther> HasOne <TOther>(Member member)
        {
            this.OnMemberMapped(member);
            OneToOnePart <TOther> oneToOnePart = new OneToOnePart <TOther>(this.EntityType, member);

            this.providers.OneToOnes.Add((IOneToOneMappingProvider)oneToOnePart);
            return(oneToOnePart);
        }
        protected virtual OneToOnePart <TOther> HasOne <TOther>(Member property)
        {
            var part = new OneToOnePart <TOther>(EntityType, property);

            oneToOnes.Add(part);

            return(part);
        }
Exemplo n.º 4
0
        OneToOnePart <TOther> HasOne <TOther>(Member member)
        {
            OnMemberMapped(member);

            var part = new OneToOnePart <TOther>(EntityType, member);

            providers.OneToOnes.Add(part);

            return(part);
        }