Ejemplo n.º 1
0
 public StudtentModels Add(StudtentModels item)
 {
     if (item == null)
     {
         throw new ArgumentNullException("item");
     }
     Articles.Add(item);
     return(item);
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public bool Update(StudtentModels item)
 {
     return(_m.Update(item));
 }
Ejemplo n.º 4
0
 public StudtentModels Add(StudtentModels item)
 {
     return(_m.Add(item));
 }