Beispiel #1
0
 // DELETE api/factor
 public Factor Delete(Factor factor)
 {
     if (facService.DeleteId(factor.BusinessPlanId, factor.ID))
     {
         return(factor);
     }
     return(null);
 }
        // DELETE api/factor/5
        public Factor Delete(int id)
        {
            Factor oldFactor = new Factor();
            var    data      = facService.SearchId(id);

            if (data.Count > 0)
            {
                oldFactor.SetFactor(data.ElementAt(0));
                if (facService.DeleteId(id))
                {
                    return(oldFactor);
                }
            }
            return(null);
        }