Beispiel #1
0
        public VDevelopment(IDevelopment development)
        {
            if (development == null)
            {
                return;
            }

            DevelopmentId = development.DevelopmentId;
            Name          = development.Name;
            Description   = development.Description;
            Rank          = development.Rank;
        }
        public VDevelopment Save(IDevelopment development)
        {
            VDevelopment dataModel = new VDevelopment(development);

            if (_context.Development.Any(x => x.DevelopmentId == development.DevelopmentId))
            {
                Update(dataModel,
                       x => x.DevelopmentId,
                       x => x.Name,
                       x => x.Description
                       );
            }
            else
            {
                Add(dataModel);
            }

            return(dataModel);
        }