Example #1
0
        public virtual void UpdateEntity(Database.Entities.Name entity)
        {
            entity.ArgumentNullCheck(nameof(entity));

            entity.FirstName  = FirstName;
            entity.LastName   = LastName;
            entity.MiddleName = MiddleName;
            entity.Title      = Title;
            entity.NickName   = NickName;
        }
Example #2
0
        public NameViewModel(int id, Database.Entities.Name entity) : base(id)
        {
            entity.ArgumentNullCheck(nameof(entity));

            Title      = entity.Title;
            FirstName  = entity.FirstName;
            MiddleName = entity.MiddleName;
            LastName   = entity.LastName;
            NickName   = entity.NickName;
        }
Example #3
0
        public virtual Database.Entities.Name CreateEntity()
        {
            var entity = new Database.Entities.Name()
            {
                FirstName  = FirstName,
                LastName   = LastName,
                Title      = Title,
                MiddleName = MiddleName,
                NickName   = NickName
            };

            return(entity);
        }