public ASize Update(ASize updatedType) { DBSize dBSize = mapperSize.Map(updatedType, context); context.SaveChanges(); return(mapperSize.Map(dBSize)); }
public void Remove(int id) { DBSize size = context.DBSizes.FirstOrDefault(size => size.ID == id); if (size is not null) { context.Remove(size); context.SaveChanges(); } }
public void Remove(Size genericType) { DBSize dBSize = mapperSize.Map(genericType); DBSize size = context.DBSizes.ToList().Find(size => size.SIZE == dBSize.SIZE); if (size is not null) { context.Remove(size); context.SaveChanges(); } }
public void update(Size existingType, Size updatedType) { DBSize dBSize = mapperSize.Map(existingType); DBSize size = context.DBSizes.ToList().Find(size => size.SIZE == dBSize.SIZE); if (size is not null) { DBSize EntityMapped = mapperSize.Map(updatedType); size.SIZE = EntityMapped.SIZE; size.Price = EntityMapped.Price; context.SaveChanges(); } }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (Algorithm != 0) { hash ^= Algorithm.GetHashCode(); } if (ErrorTolerance != 0D) { hash ^= ErrorTolerance.GetHashCode(); } if (File.Length != 0) { hash ^= File.GetHashCode(); } if (Support != 0D) { hash ^= Support.GetHashCode(); } if (SampleSize != 0) { hash ^= SampleSize.GetHashCode(); } if (K != 0) { hash ^= K.GetHashCode(); } if (UseTopK != false) { hash ^= UseTopK.GetHashCode(); } if (DBSize != 0) { hash ^= DBSize.GetHashCode(); } if (ShutdownServer != false) { hash ^= ShutdownServer.GetHashCode(); } return(hash); }