Skip to content

Commit

Permalink
Update Src/Services/BrandService.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
gitauto-ai[bot] authored Oct 31, 2024
1 parent 76c5d50 commit 6a5683a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Src/Services/BrandService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,17 @@ public void DisassociateSubcollection(int brandId, int subcollectionId)
brand.Subcollections.Remove(subcollection);
_context.SaveChanges();
}

public bool BrandExists(int brandId)
{
return _context.Brands.Any(b => b.Id == brandId);
}

public bool SubcollectionExists(int subcollectionId)
{
return _context.Subcollections.Any(s => s.Id == subcollectionId);
}
}

}

Check notice on line 51 in Src/Services/BrandService.cs

View check run for this annotation

codefactor.io / CodeFactor

Src/Services/BrandService.cs#L51

A closing brace should not be preceded by a blank line. (SA1508)
}

0 comments on commit 6a5683a

Please sign in to comment.