public static bool RemoverTamanho(Tamanho tamanho) { try { mdl.Tamanhos.Remove(tamanho); mdl.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public static bool AlterarTamanho(Tamanho tamanho) { try { mdl.Entry(tamanho).State = System.Data.Entity.EntityState.Modified; mdl.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public static bool AdicionarTamanho(Tamanho tamanho) { try { mdl.Tamanhos.Add(tamanho); mdl.SaveChanges(); return(true); } catch (Exception) { return(false); } }