Beispiel #1
0
        public ComapnyPromotion addcomp(ComapnyPromotion cp)
        {
            _db.ComapnyPromotion.Add(cp);
            _db.SaveChanges();

            return(cp);
        }
Beispiel #2
0
        public ActionResult addcomp(ComapnyPromotion cp)
        {
            //= new ComapnyPromotion();
            //cp.Name = ncp.Name;
            //IFormFile pic = ncp.Logo;

            //using (MemoryStream ms = new MemoryStream())
            //{
            //    pic.CopyTo(ms);
            //    cp.Logo = ms.ToArray();
            //}


            return(Ok(comp.addcomp(cp)));
        }