public bool Delete(PLGenre item) { if (PLValidation.IsItemNull(item)) { Console.WriteLine("Cant delete null"); } bool deleteResult = _curGenrelWorkerService.Delete(new BLLGenre { Id = item.Id, GenreName = item.GenreName, Description = item.Description }); if (deleteResult) { Console.WriteLine($"Item with Id={item.Id} was deleted"); } else { Console.WriteLine($"Item delete error"); } return(deleteResult); }
public bool Update(PLPublisher item) { if (PLValidation.IsItemNull(item)) { Console.WriteLine("Cant update null"); return(false); } bool updResult = _curPublWorkerService.Update(new BLLPublisher { Id = item.Id, PublisherName = item.PublisherName, LicenseNumber = item.LicenseNumber }); if (updResult) { Console.WriteLine($"Item with Id={item.Id} was updated"); } else { Console.WriteLine($"Item update error"); } return(updResult); }
public int Add(PLPublisher item) { if (PLValidation.IsItemNull(item)) { Console.WriteLine("Cant add null"); return(0); } int addResult = _curPublWorkerService.Add(new BLLPublisher { PublisherName = item.PublisherName, LicenseNumber = item.LicenseNumber }); if (addResult > 0) { Console.WriteLine($"Item {item.PublisherName} was added"); } else { Console.WriteLine($"Item add error"); } return(addResult); }
public bool Update(PLGenre item) { if (PLValidation.IsItemNull(item)) { Console.WriteLine("Cant update null"); return(false); } bool updResult = _curGenrelWorkerService.Update(new BLLGenre { Id = item.Id, GenreName = item.GenreName, Description = item.Description }); if (updResult) { Console.WriteLine($"Item with Id={item.Id} was updated"); } else { Console.WriteLine($"Item update error"); } return(updResult); }
public int Add(PLGenre item) { if (PLValidation.IsItemNull(item)) { Console.WriteLine("Cant add null"); return(0); } int addResult = _curGenrelWorkerService.Add(new BLLGenre { GenreName = item.GenreName, Description = item.Description }); if (addResult > 0) { Console.WriteLine($"Item {item.GenreName} was added"); } else { Console.WriteLine($"Item add error"); } return(addResult); }
public bool Delete(PLPublisher item) { if (PLValidation.IsItemNull(item)) { Console.WriteLine("Cant add delete"); return(false); } bool deleteResult = _curPublWorkerService.Delete(new BLLPublisher { Id = item.Id, PublisherName = item.PublisherName, LicenseNumber = item.LicenseNumber }); if (deleteResult) { Console.WriteLine($"Item with Id={item.Id} was deleted"); } else { Console.WriteLine($"Item delete error"); } return(deleteResult); }