public void CreateData(SimpleAPI api) { if (api == null) // if null, throw an exception { throw new ArgumentNullException(nameof(api)); } ctx.MyData.Add(api); //Add data if api has value }
void ISimpleAPIRepo.CreateData(SimpleAPI api) { throw new System.NotImplementedException(); }
}//end of getDataById method public void UpdateSimpleApi(SimpleAPI api) { throw new System.NotImplementedException(); }
public void UpdateSimpleApi(SimpleAPI api) { //Noting }