public ServiceResult Delete(Strain s) { if (s == null || string.IsNullOrWhiteSpace(s.UUID)) { return(ServiceResponse.Error("Invalid account was sent.")); } StrainManager strainManager = new StrainManager(Globals.DBConnectionKey, Request.Headers?.Authorization?.Parameter); return(strainManager.Delete(s)); }
public ServiceResult Delete(Strain s) { if (s == null || string.IsNullOrWhiteSpace(s.UUID)) { return(ServiceResponse.Error("Invalid account was sent.")); } StrainManager strainManager = new StrainManager(Globals.DBConnectionKey, this.GetAuthToken(Request)); return(strainManager.Delete(s)); }
public ServiceResult Delete(string uuid) { if (string.IsNullOrWhiteSpace(uuid)) { return(ServiceResponse.Error("Invalid id was sent.")); } StrainManager strainManager = new StrainManager(Globals.DBConnectionKey, Request.Headers?.Authorization?.Parameter); Strain fa = (Strain)strainManager.GetBy(uuid); if (fa == null) { return(ServiceResponse.Error("Could not find strain.")); } return(strainManager.Delete(fa)); }
public ServiceResult Delete(string uuid) { if (string.IsNullOrWhiteSpace(uuid)) { return(ServiceResponse.Error("Invalid id was sent.")); } StrainManager strainManager = new StrainManager(Globals.DBConnectionKey, this.GetAuthToken(Request)); var res = strainManager.Get(uuid); if (res.Code != 200) { return(res); } Strain fa = (Strain)res.Result; return(strainManager.Delete(fa)); }