Exemplo n.º 1
0
 //create
 public QualityMusic Create(QualityMusic qualityMusic)
 {
     db.QualityMusics.Add(qualityMusic);
     if (db.SaveChanges() > 0)
     {
         return(qualityMusic);
     }
     ;
     return(null);
 }
Exemplo n.º 2
0
        // POST api/<controller>
        public IHttpActionResult Post(QualityMusicView q)
        {
            var item = new QualityMusic {
                MusicFile = q.MusicFile, MusicID = q.MusicID, NewFile = q.NewFile, QMusicApproved = q.QMusicApproved, QualityID = q.QualityID
            };
            var res = Repositories.CreateQM(item);

            if (res == true)
            {
                return(Ok());
            }
            return(InternalServerError());
        }
Exemplo n.º 3
0
 public static bool CreateQM(QualityMusic qm)
 {
     return(MusicBUS.CreateQM(qm));
 }
Exemplo n.º 4
0
 //update
 public void Update(QualityMusic qualityMusic)
 {
     db.Entry(qualityMusic).State = EntityState.Modified;
     db.SaveChanges();
 }
 public static bool CreateQM(QualityMusic qm)
 {
     var en = new ProjectNCTEntities();
     en.QualityMusics.Add(qm);
     return en.SaveChanges() > 0 ? true : false;
 }