예제 #1
0
        public bool Insert(SolutionNew product)
        {
            Func <bool> func = new Func <bool>(() => {
                _entity.SolutionNew.Add(product);

                _entity.SaveChanges();

                return(true);
            });

            return(_adapter.Catch <bool>(func));
        }
예제 #2
0
        public bool Insert(ProductNew product)
        {
            {
                Func <bool> func = new Func <bool>(() => {
                    _entity.Entry(product).State = EntityState.Added;

                    _entity.SaveChanges();

                    return(true);
                });

                return(_adapter.Catch <bool>(func));
            }
        }
예제 #3
0
        public bool Insert(CarouselNew carousel)
        {
            {
                Func <bool> func = new Func <bool>(() => {
                    _entity.Entry(carousel).State = EntityState.Added;

                    _entity.SaveChanges();

                    return(true);
                });

                return(_adapter.Catch <bool>(func));
            }
        }
예제 #4
0
        public bool Insert(NewsKindNew pro_kind)
        {
            {
                Func <bool> func = new Func <bool>(() =>
                {
                    _entity.NewsKindNew.Add(pro_kind);
                    try
                    {
                        _entity.SaveChanges();
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }
                    return(true);
                });

                return(_adapter.Catch <bool>(func));
            }
        }
예제 #5
0
        public bool Insert(ProKindNew pro_kind)
        {
            {
                Func <bool> func = new Func <bool>(() =>
                {
                    _entity.Entry(pro_kind).State = EntityState.Added;

                    try
                    {
                        _entity.SaveChanges();
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }
                    return(true);
                });

                return(_adapter.Catch <bool>(func));
            }
        }
예제 #6
0
        public bool Insert(SolutionKindNew solution_kind)
        {
            //
            {
                Func <bool> func = new Func <bool>(() =>
                {
                    //

                    _entity.SolutionKindNew.Add(solution_kind);

                    _entity.SaveChanges();

                    return(true);
                });

                return(_adapter.Catch <bool>(func));
            }
        }