Esempio n. 1
0
        public static Guid Insert(Medicine medicine)
        {
            if (medicine == null)
            {
                throw new ArgumentException("Medicine information was not provided");
            }

            var query = SqlQueryGeneration.InsertMedicine(medicine);

            try
            {
                return(_sqlManager.InsertMedicine(query, medicine.Image));
            }
            catch (SqlException e)
            {
                //ToDo: Log Exception
                throw new Exception("Failed to insert Medicine", e);
            }
        }