Exemplo n.º 1
0
        public async Task <string> AddInstitution(Institution ins, string type)
        {
            switch (type)
            {
            case "clinic": db.Clinics.Add(ins.ConvertToClinic()); break;

            case "laboratory": db.Labaratories.Add(ins.ConvertToLabaratory()); break;

            case "pharmacy": db.Pharmacies.Add(ins.ConvertToPharmacy()); break;
            }
            await db.SaveChangesAsync();

            return("OKey!");
        }