public static void AddItem(APIBank postedItem) { List <APIBank> list = GetData(); postedItem.Code = (list.Count + 1).ToString(); list.Add(postedItem); }
public static void UpdateItem(APIBank postedItem) { var editedModel = GetData().First(i => i.Code == postedItem.Code); editedModel.Name = postedItem.Name; editedModel.Address = postedItem.Address; editedModel.SwiftCode = postedItem.SwiftCode; editedModel.Logo = postedItem.Logo; }