public static IngridientRepository GetInstance()
 {
     if (instance == null)
     {
         instance = new IngridientRepository();
     }
     return(instance);
 }
Example #2
0
        public IngridientRatio Read(uint id)
        {
            List <string[]> temp = Persistence.ReadEntryByPrimaryKey(path, id.ToString());

            return(new IngridientRatio(uint.Parse(temp[0][0]), decimal.Parse(temp[0][3]), uint.Parse(temp[0][2]), IngridientRepository.GetInstance().Read(uint.Parse(temp[0][1]))));
        }