public async Task <OcrClass> DeleteOcrClassR(int ocrClassId)
        {
            OcrClass dbEntry = context.OcrClasses.
                               FirstOrDefault(c => c.Id == ocrClassId);

            if (dbEntry != null)
            {
                context.OcrClasses.Remove(dbEntry);
                await context.SaveChangesAsync();

                return(dbEntry);
            }
            return(null);
        }
        public async Task <bool> UpdateOcrClass(OcrClass ocrClass)
        {
            OcrClass dbEntry = context.OcrClasses.
                               FirstOrDefault(c => c.Id == ocrClass.Id);

            if (dbEntry != null)
            {
                dbEntry.FileName             = ocrClass.FileName;
                dbEntry.GraphemeRootId       = ocrClass.GraphemeRootId;
                dbEntry.VowelDiacreticId     = ocrClass.VowelDiacreticId;
                dbEntry.ConsonantDiacreticId = ocrClass.ConsonantDiacreticId;
                await context.SaveChangesAsync();

                return(true);
            }
            return(false);
        }
 public async Task AddOcrClass(OcrClass ocrClass)
 {
     context.OcrClasses.Add(ocrClass);
     await context.SaveChangesAsync();
 }