// PUT api/awbuildversion/5
        public void Put(Illustration1 value)
        {
            var GetActionType = Request.Headers.Where(x => x.Key.Equals("ActionType")).FirstOrDefault();

            if (GetActionType.Key != null)
            {
                if (GetActionType.Value.ToList()[0].Equals("DELETE"))
                    adventureWorks_BC.Illustration1Delete(value);
                if (GetActionType.Value.ToList()[0].Equals("UPDATE"))
                    adventureWorks_BC.Illustration1Update(value);
            }
        }
Ejemplo n.º 2
0
 public bool Illustration1Delete(Illustration1 illustration1)
 {
     return(Execute <bool>(dal =>
     {
         Illustration1 illustration1Delete = dal.Illustration1.Where(x => x.IllustrationID == illustration1.IllustrationID).FirstOrDefault();
         if (illustration1Delete != null)
         {
             dal.Illustration1.DeleteOnSubmit(illustration1Delete);
             dal.SubmitChanges();
             return true;
         }
         return false;
     }));
 }
Ejemplo n.º 3
0
        // PUT api/awbuildversion/5
        public void Put(Illustration1 value)
        {
            var GetActionType = Request.Headers.Where(x => x.Key.Equals("ActionType")).FirstOrDefault();

            if (GetActionType.Key != null)
            {
                if (GetActionType.Value.ToList()[0].Equals("DELETE"))
                {
                    adventureWorks_BC.Illustration1Delete(value);
                }
                if (GetActionType.Value.ToList()[0].Equals("UPDATE"))
                {
                    adventureWorks_BC.Illustration1Update(value);
                }
            }
        }
Ejemplo n.º 4
0
        public bool Illustration1Update(Illustration1 illustration1)
        {
            return(Execute <bool>(dal =>
            {
                Illustration1 illustration1Update = dal.Illustration1.Where(x => x.IllustrationID == illustration1.IllustrationID).FirstOrDefault();
                if (illustration1Update != null)
                {
                    illustration1Update.IllustrationID = illustration1.IllustrationID;
                    illustration1Update.Diagram = illustration1.Diagram;
                    illustration1Update.ModifiedDate = illustration1.ModifiedDate;

                    dal.SubmitChanges();
                    return true;
                }
                return false;
            }));
        }
 // POST api/awbuildversion
 public void Post(Illustration1 value)
 {
     adventureWorks_BC.Illustration1Add(value);
 }
Ejemplo n.º 6
0
 // POST api/awbuildversion
 public void Post(Illustration1 value)
 {
     adventureWorks_BC.Illustration1Add(value);
 }