public StudtentModels Add(StudtentModels item)
 {
     if (item == null)
     {
         throw new ArgumentNullException("item");
     }
     Articles.Add(item);
     return(item);
 }
        public bool Update(StudtentModels item)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }

            int index = Articles.FindIndex(p => p.Id == item.Id);

            if (index == -1)
            {
                return(false);
            }
            Articles.RemoveAt(index);
            Articles.Add(item);
            return(true);
        }
예제 #3
0
 public bool Update(StudtentModels item)
 {
     return(_m.Update(item));
 }
예제 #4
0
 public StudtentModels Add(StudtentModels item)
 {
     return(_m.Add(item));
 }